Unix Technical Forum

character limit issue

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 ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:32 AM
d
 
Posts: n/a
Default character limit issue

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 11:32 AM
d
 
Posts: n/a
Default Re: character limit issue - RECALL

solved (forgot to escape single quote).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 11:32 AM
Kees Nuyt
 
Posts: n/a
Default Re: character limit issue

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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com