Tuesday, September 20, 2011

Database modifications

I need to modify the structure of my database, because I noticed in my practice AJAX call to PHP, the "+" sign was getting lost. I'm sure I could fiddle around to get it back, but I'd lose generality and I don't need it. I already store an operation code in the database, so I simply need to record the numbers being operated on in their own fields.

Rather than changing the fields in an old table, I'll just create a new one. As this is an open source project, for future reference and replication, it seems cleaner to record a single create command, than to recall a dud one and a series of changes. The SQL command was:

CREATE TABLE Items(
Itemid INT NOT NULL AUTO_INCREMENT ,
Partid BIGINT,
OpCode SMALLINT,
ItemLeft SMALLINT,
ItemRight SMALLINT,
Raw SMALLINT,
Rate DOUBLE,
PRIMARY KEY ( Itemid )
)

I ran this with phpMyAdmin, because my ISP offers it, and it was quick and easy to do so.

I am now ready to make the coding changes in the Applet.

No comments:

Post a Comment