MySQL Forums
Forum List  »  Newbie

Re: error 1170 / BLOB column 'caption' used in key specification without a key length
Posted by: Shantanu Oak
Date: July 12, 2005 04:00AM

caption is a text field. You MUST add the keylength
KEY search (caption (200))

It's a bad programming practice to add varchar(255) even if varchar(25) will suffice.
Why?
The total key length can not be more than 500 (or 1000 depending upon the MySQL version)
In your case the length of the key (search) will be 255*7 (7 columns other than caption)

If you remove the last line, declaring the key search, it will work.
, KEY search (title, caption, keywords, filename, user1, user2, user3, user4)

Options: ReplyQuote


Subject
Written By
Posted
Re: error 1170 / BLOB column 'caption' used in key specification without a key length
July 12, 2005 04:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.