table creation issue
Posted: Tue Dec 30, 2003 9:59 pm
not sure why but it keeps telling me i have an error at "when...."
i can't find anything that tells me when is a reserved word so i don't really know what's the issue here. any help would be appreciated.note: this table is used to log the approval/rejection of things on the site... incase someone witht he power to approve/reject decides to abuse it. if someone feels it's being abused the ways built in to track down the pattern are by approver, member, item, and date. if it's been approved (ok) is there incase an admin wants to review recent actions of just approvals or rejections.
i can't find anything that tells me when is a reserved word so i don't really know what's the issue here. any help would be appreciated.
Code: Select all
CREATE TABLE apphist(
appindex int unsigned NOT NULL auto_increment PRIMARY KEY,
approver varchar(15) NOT NULL,
member varchar(15) NOT NULL,
item tinyint(1) NOT NULL,
reason tinytext,
ok tinyint(1) NOT NULL,
when datetime default '0000-00-00 00:00:00' NOT NULL,
KEY approver (approver),
KEY member (member),
KEY item (item),
KEY ok (ok),
KEY when (when)
) TYPE=MyISAM;