PDA


View Full Version : Database Index


slurp
06-08-2005, 09:47 AM
Brian,

In the links table you have the linkid field as the primary and then again as an index, generating the following error:

PRIMARY and INDEX keys should not both be set for column `linkid`

I did the following to correct this via phpmyadmin:

ALTER TABLE `links` DROP PRIMARY KEY ,
ADD PRIMARY KEY ( `linkid` , `suspended` , `valid` , `dateline` )

ALTER TABLE `links` DROP INDEX `linkid`

This seems to have corrected the error, was there a better solution?