Jump to content
xisto Community
Sign in to follow this  
krap

Mysql Field Types Wont let me go over 255

Recommended Posts

i got this forum software and i installed it and they text limit is 255 characters (it's a forum for mobile web on mobile phones so thats ok) and i wanted to increase it to 2000 as my members make large posts..
So i go to phpmyadmin, find the field where the post goes in which has the type "varchar(255)" so i edit this and put length/values to 2000 and i get this error:

MySQL said:  #1074 - Too big column length for column 'text' (max = 255). Use BLOB instead

so i look in the list and find BLOB then try and i get this:

#1170 - BLOB column 'text' used in key specification without a key length

if any1 knows what im doing wrong please post here

thanks in advance
krap

Share this post


Link to post
Share on other sites

the maximum length for a varchar in mySQL is 255I would use a Text field, which has a limit of 65,000 bytesbut I don't know if the forum script you use will support that, you may need to edit the scripts too.

Share this post


Link to post
Share on other sites

You can use a BLOB or TEXT, but to specify length you'd have to check it in the PHP. Actually, all the length does is specify a cutoff point. If you put "abcdefghijk" into a VARCHAR(5), it'll be stored as "abcde".

Share this post


Link to post
Share on other sites

Yeah, if you use varchar() it it only goes from 0-255. I would pust something like 'text', and you most likely won't fill that one up.. Or BLOB like the others said; I just don't like using blob. >_>; Or if the text in the field is just going to be numbers, and not any writing or anything, you could use 'bigint' which is from -REALBIGNUMBER to +REALBIGNUMBER >_____>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.