Bug #17907 Updated: mysql_query seems to strip trailing spaces from variables
| From: | andrewt at weekendhosting dot com | Date: | Fri, 21 Jun 2002 17:45:00 +0000 |
| Subject: | Bug #17907 Updated: mysql_query seems to strip trailing spaces from variables | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11711@lists.php.net to get a copy of this message | ||
ID: 17907
Updated by: andrewt@weekendhosting.com
Reported By: andrewt@weekendhosting.com
-Status: Bogus
+Status: Open
Bug Type: MySQL related
Operating System: Win2000 / Unix
PHP Version: 4.2.1
New Comment:
It's nothing more complex than I can't insert a variable in which the
last character is whitespace into mysql using mysql_query.
$myVar = '1234 ';
will go in to the database as '1234'
I can do this using mysqlfront which indicates there is something
different in the php function mysql_query
Previous Comments:
------------------------------------------------------------------------
[2002-06-21 13:38:45] cynic@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2002-06-21 13:37:37] andrewt@weekendhosting.com
Further to this mysqlfront (which is presumably using the c++ mysql API
can handle this trailing space no problem)
------------------------------------------------------------------------
[2002-06-21 13:34:25] andrewt@weekendhosting.com
$myVar = 'SR4 1 ';
$sql = "INSERT INTO myTable (myField) VALUES ('$myVar')";
echo $sql."<br>";
$result = mysql_query($sql);
-----
I'm not so sure if this is a bug, but surely, it's not supposed to do
this ??
Thanks
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17907&edit=1