RE: php maximum characters in text field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >varchar maxs out at 255 characters
> just for clarification, mysql varchar easily can hold more than 255
> characters 
> (I remember it was the case in ancient 3.x times) 
> only if one wants to store newlines he must use type "text"
> 
> just my 2 cent

News to me, so I check the docs.
http://dev.mysql.com/doc/refman/5.0/en/char.html

Apparently varchar can "easily" hold more than 255 chars IF YOU USE VERSION 5.0.3 OR LATER.
"Values in VARCHAR columns are variable-length
        strings. The length can be specified as a value from 0 to 255
        before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions."

We assume the OP is using <form method="post"> if he is checking the $_POST variable.  Good catch (OKi98) if he is not.

_________________________________________________________________
Windows Live Hotmail and Microsoft Office Outlook – together at last.  Get it now.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux