RE: [PHP-DB] php maximum characters in text field
| From: | VanBuskirk, Patricia | Date: | Mon, 15 Oct 2007 16:48:16 +0000 |
| Subject: | RE: [PHP-DB] php maximum characters in text field | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44214@lists.php.net to get a copy of this message | ||
I am starting to believe it is NOT the character length that is causing the problem. We have
received other orders with more in it than that, and they came in ok. I think there may be
something in the input that php does not like. I've been searching for code that will
"clean up" input, possibly preg_replace?
-----Original Message-----
From: Instruct ICC [mailto:instructicc@hotmail.com]
Sent: Monday, October 15, 2007 10:37 AM
To: php-db@lists.php.net
Subject: RE: [PHP-DB] php maximum characters in text field
> >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