Bug #17023 Updated: mysql_query: whitespace after ';' causes sql syntax error
| From: | derick@php.net | Date: | Mon, 06 May 2002 05:12:18 +0000 |
| Subject: | Bug #17023 Updated: mysql_query: whitespace after ';' causes sql syntax error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6996@lists.php.net to get a copy of this message | ||
ID: 17023
Updated by: derick@php.net
Reported By: kse@wp.pl
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Linux
PHP Version: 4.2.0
New Comment:
Lose the ; and it will always work. The ; is not needed from
mysql_query().
Not a bug -> Bogus.
Previous Comments:
------------------------------------------------------------------------
[2002-05-05 19:31:10] kse@wp.pl
Note the trailing whitespace in query:
<?
mysql_select_db("test");
mysql_query("select * from tab; ");
echo mysql_error();
?>
Result:
You have an error in your SQL syntax near '; ' at line 1
Again, note the trailing whitespace. Without it, it's OK.
It's particullary annoying with heredoc syntax.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17023&edit=1