From:             [EMAIL PROTECTED]
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

Reply via email to