RE: [PHP-DB] php maximum characters in text field
| From: | Instruct ICC | Date: | Mon, 15 Oct 2007 14:37:11 +0000 |
| Subject: | RE: [PHP-DB] php maximum characters in text field | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44213@lists.php.net to get a copy of this message | ||
> >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