This is a discussion on character limit issue within the MySQL forums, part of the Database Server Software category; --> I have questionnaire that works fine at inputing data into my table's field, but when the text gets to ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have questionnaire that works fine at inputing data into my table's field, but when the text gets to a couple of sentences, it starts showing up as blank. The field is set as MEDIUMTEXT and I'm not even close to the limit for this type. For example: THIS WORKS if($_REQUEST['qtwo'] == "a") { $qtwo = "Though common in many workplaces, this choice is not one of the better ways to handle this situation. While it is true that sending"; } THIS DOESN'T WORK (shows as blank in MySQL) if($_REQUEST['qtwo'] == "a") { $qtwo = "Though common in many workplaces, this choice is not one of the better ways to handle this situation. While it is true that sending offensive email violates the district's computer"; } field is NOT NULL, Collation: latin1_swedish_ci Does anyone know what might be causing this? |
| ||||
| On Fri, 18 Jan 2008 11:48:53 -0800, d <dh50@yahooo.com> wrote: >I have questionnaire that works fine at inputing data into my table's >field, but when the text gets to a couple of sentences, it starts >showing up as blank. The field is set as MEDIUMTEXT and I'm not even >close to the limit for this type. For example: > >THIS WORKS > >if($_REQUEST['qtwo'] == "a") { >$qtwo = "Though common in many workplaces, this choice is not one of the >better ways to handle this situation. While it is true that sending"; >} > > > >THIS DOESN'T WORK (shows as blank in MySQL) > >if($_REQUEST['qtwo'] == "a") { >$qtwo = "Though common in many workplaces, this choice is not one of the >better ways to handle this situation. While it is true that sending >offensive email violates the district's computer"; >} > > >field is NOT NULL, Collation: latin1_swedish_ci > > >Does anyone know what might be causing this? It depends on the way you bind this to your MySQL INSERT statement. I think the single quote is the culprit. Advice: error_log() the exact statement to your php_error.log to diagnose. -- ( Kees ) c[_] One must still have chaos in oneself to be able to give birth to a dancing star. (Nietzsche) (#425) |