|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-02-19 16:54 UTC] wez@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 01:00:01 2025 UTC |
Description: ------------ or at least that's my guess. when calling $PDObj->exec() "sql statement here;" works as expected "sql statement here; " causes a MySQL syntax error (note the trailing space) Reproduce code: --------------- $sql = "SELECT * FROM some_table; "; if (FALSE === $res = $PDO->exec($sql)) { $err = $PDO->errorInfo(); echo "Error: {$err[1]}: {$err[2]}\n"; } Expected result: ---------------- no error Actual result: -------------- Error: 1064: You have an error in your SQL syntax near '; ' at line 1