Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-12-2005, 05:41 PM   #1
darnit
Confirmed User
 
Join Date: Jul 2001
Location: Teh Interweb
Posts: 2,439
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.
darnit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2005, 05:50 PM   #2
EddiePulp
Confirmed User
 
Join Date: Mar 2004
Location: Australia iCQ:408018496
Posts: 1,332
google that shit
__________________
I dont need a sig.
EddiePulp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2005, 05:53 PM   #3
darnit
Confirmed User
 
Join Date: Jul 2001
Location: Teh Interweb
Posts: 2,439
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.
darnit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2005, 05:56 PM   #4
mlj
Registered User
 
Join Date: Jun 2005
Posts: 89
Try using MODIFY instead of CHANGE since it has the same field name.

ALTER TABLE `PLD_LINK` MODIFY `DESCRIPTION` LONGTEXT DEFAULT NULL
mlj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2005, 06:08 PM   #5
Doc911
Confirmed User
 
Join Date: Feb 2004
Location: If i was up your ass you'd know
Posts: 3,695
what he said or hire a programmer to do it
__________________


For PHP/MySQL scripts ICQ 161480555 or email [email protected]
Doc911 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2005, 06:37 PM   #6
Azlord
Confirmed User
 
Azlord's Avatar
 
Industry Role:
Join Date: Dec 2003
Location: City... City of Satan
Posts: 2,651
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.
Azlord is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2005, 07:02 PM   #7
darnit
Confirmed User
 
Join Date: Jul 2001
Location: Teh Interweb
Posts: 2,439
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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2005, 07:26 PM   #8
darnit
Confirmed User
 
Join Date: Jul 2001
Location: Teh Interweb
Posts: 2,439
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.
darnit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.