Bug #17023: mysql_query: whitespace after ';' causes sql syntax error
| From: | kse at wp dot pl | Date: | Sun, 05 May 2002 23:31:11 +0000 |
| Subject: | Bug #17023: mysql_query: whitespace after ';' causes sql syntax error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-6984@lists.php.net to get a copy of this message | ||
From: kse@wp.pl
Operating system: Linux
PHP version: 4.2.0
PHP Bug Type: MySQL related
Bug description: mysql_query: whitespace after ';' causes sql syntax error
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 bug report at http://bugs.php.net/?id=17023&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17023&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17023&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17023&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17023&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17023&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17023&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17023&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17023&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17023&r=globals