![]() |
Geeky MySQL Problem
Hi,
Im setting up a directory script and am trying to change the description field type from VARCHAR (255 limit) to LONGTEXT to allow for longer descriptions however I'm getting the following error: Error SQL-query : ALTER TABLE `PLD_LINK` CHANGE `DESCRIPTION` `DESCRIPTION` LONGTEXT DEFAULT NULL MySQL said: #1170 - BLOB column 'DESCRIPTION' used in key specification without a key length Ive tried setting the lenght to 1000 but the error still occurs. :helpme |
google that shit
|
Quote:
|
Try using MODIFY instead of CHANGE since it has the same field name.
ALTER TABLE `PLD_LINK` MODIFY `DESCRIPTION` LONGTEXT DEFAULT NULL |
what he said or hire a programmer to do it
|
BLOB columns are treated as binary strings (byte strings).
you need to set that column to text... TEXT types, TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT depending on how long the entry is. |
Quote:
#1170 - BLOB column 'DESCRIPTION' used in key specification without a key length Very strange. BTW im trying to do all this via myphpadmin if that makes a diffrence.... |
Fixed it via this post I found:
this problem appeared to us when we tried to place a normal "INDEX" on a column of datatype TEXT. Our solution, which is definitely legal but not necessarily effective (currently unknown) was to change the ALTER TABLE... command from INDEX to ALTER TABLE... FULLTEXT (column). Thanks all for the suggestions. |
All times are GMT -7. The time now is 09:36 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123