[PHPwestoz] [OT] MySQL UNIQUE INDEX
Timothy White
weirdo at tigris.org
Mon Feb 21 11:45:02 UTC 2005
I know this isn't PHP but hopefully one of you guys will know the answer
(and it is for a PHP project)
I am trying to create a table that has a primary key and a unique key
based on different columns.
The query is:
CREATE TABLE library (
ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
Filename TEXT NOT NULL,
Artist TEXT NULL,
Title TEXT NULL,
Album TEXT NULL,
FID TEXT(40) NOT NULL,
PRIMARY KEY ID (ID),
INDEX UID (FID)
) TYPE = MyISAM COMMENT ='';
And the error is:
ERROR 1170 (42000): BLOB/TEXT column 'FID' used in key specification
without a key length
I can't find anything in the manual that tells me how to get around this.
Thanks
Tim
--
Tim White - Use the Fox, Luke!
PGP/GPG id: 602E944D, Pub Key Serv: subkeys.pgp.net
Fingerprint: 04C2 9682 B7B2 3006 009D A9F3 067E EDCD 602E 944D
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!
--
More information about the PHPwestoz
mailing list