Forum Moderators: open

Message Too Old, No Replies

Is this CREATE TABLE correct?

         

PeteM

10:51 am on Jun 9, 2006 (gmt 0)

10+ Year Member



I've written a phpBB MOD script that contains this CREATE TABLE. For virtually all users it works OK.

CREATE TABLE phpbb_ads_images (
id int(11) NOT NULL default '0',
img_seq_no int(11) NOT NULL AUTO_INCREMENT,
img_description text NOT NULL,
img_deleted_ind tinyint(1) NOT NULL default '0',
PRIMARY KEY (id, img_seq_no));

however one person reports an error....

MySQL said:

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

Any ideas?

Thanks,PeTe

coopster

7:47 pm on Jun 9, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Looks correct to me. If they left the "PRIMARY KEY" line off they might get that error. They didn't happen to miss that part during a copy/paste or something, did they?