MySQL questoin: column type for a 500 character limit.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
gotDNS
Forum Contributor
Posts: 217
Joined: Tue May 07, 2002 5:53 pm
Location: West Chester, PA

MySQL questoin: column type for a 500 character limit.

Post by gotDNS »

What column type would i use in a MySQL table if i wanted to set a 500 character limit on it?

Thanks.

(Sorry i have so many questions...this should be the last for awhile)
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

i dont think there is.
but im not an expert on types... i'd always just substr() it before i put it in, also saves a little bit of space because mysql has to pad the row with information on how long it is
User avatar
gotDNS
Forum Contributor
Posts: 217
Joined: Tue May 07, 2002 5:53 pm
Location: West Chester, PA

Post by gotDNS »

I was origionally gonna jsut mke it BLOB, then have the PHP limit it....but then my oldest brother told me that someone could jsut send a TCP packet manually and get around it or w/e if they REALLY wanted too....but I dont think he knew that the only thing below 66500 approx. characters was 256 (TINYBLOB)....and that i wanted 500...ah well, my bro is a super-security freak anyway...my other bro agree's with my origional intentions anyway....thanks though, Hobgoblin.

later on, -Brian
Post Reply