GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Geeky MySQL Problem (https://gfy.com/showthread.php?t=502948)

darnit 08-12-2005 05:41 PM

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

EddiePulp 08-12-2005 05:50 PM

google that shit

darnit 08-12-2005 05:53 PM

Quote:

Originally Posted by EddiePulp
google that shit

I googled the hell out of it and read the online docs.... im a lover not a coder so it was mostly greek to me. Thought someone here would know how to do it in english not geekspeak.

mlj 08-12-2005 05:56 PM

Try using MODIFY instead of CHANGE since it has the same field name.

ALTER TABLE `PLD_LINK` MODIFY `DESCRIPTION` LONGTEXT DEFAULT NULL

Doc911 08-12-2005 06:08 PM

what he said or hire a programmer to do it

Azlord 08-12-2005 06:37 PM

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.

darnit 08-12-2005 07:02 PM

Quote:

Originally Posted by Azlord
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.

Yea ive tried all of those with the same error:

#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....

darnit 08-12-2005 07:26 PM

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