Page 1 of 1

MySQL questoin: column type for a 500 character limit.

Posted: Fri Aug 16, 2002 3:36 pm
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)

Posted: Fri Aug 16, 2002 4:45 pm
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

Posted: Fri Aug 16, 2002 4:52 pm
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