note 113460 added to function.odbc-exec
| From: | petercdow at gmail dot com | Date: | Mon, 14 Oct 2013 01:54:22 +0000 |
| Subject: | note 113460 added to function.odbc-exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196549@lists.php.net to get a copy of this message | ||
An SQL statement that contains quotes (i.e. ") instead of apostrophes (i.e. ') to delimit
strings works fine in Access, however, in odbc_exec, it fails with
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 6.
For example:
$q = "INSERT INTO TableA (Fld1, Fld2, Fld3) VALUES('A', 'B',
'C');"
works fine in both Access and ODBC, but
$q = 'INSERT INTO TableA (Fld1, Fld2, Fld3) VALUES("A", "B",
"C");'
fails with the above error.
----
Server IP: 69.147.83.199
Probable Submitter: 108.38.105.46
----
Manual Page -- http://php.net/manual/en/function.odbc-exec.php
Edit -- https://master.php.net/note/edit/113460
Del: integrated -- https://master.php.net/note/delete/113460/integrated
Del: useless -- https://master.php.net/note/delete/113460/useless
Del: bad code -- https://master.php.net/note/delete/113460/bad+code
Del: spam -- https://master.php.net/note/delete/113460/spam
Del: non-english -- https://master.php.net/note/delete/113460/non-english
Del: in docs -- https://master.php.net/note/delete/113460/in+docs
Del: other reasons-- https://master.php.net/note/delete/113460
Reject -- https://master.php.net/note/reject/113460
Search -- https://master.php.net/manage/user-notes.php