note 123505 added to function.odbc-execute
| From: | dj at magma dot nz | Date: | Wed, 09 Jan 2019 19:07:43 +0000 |
| Subject: | note 123505 added to function.odbc-execute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-210027@lists.php.net to get a copy of this message | ||
When using odbc_execute to an MS Access database use single quotes (not double quotes) for literal
string definitions.
e.g. $sql = "Insert into [table] ([first], [last]) select 'Bob',
'Builder';"
If you use double quotes you may end up with an error like: [Microsoft] [ODBC Text Driver] Too few
parameters. Expected: 2
----
Server IP: 208.43.231.9
Probable Submitter: 82.199.157.35 (proxied: 49.224.40.150)
----
Manual Page -- http://php.net/manual/en/function.odbc-execute.php
Edit -- https://master.php.net/note/edit/123505
Del: integrated -- https://master.php.net/note/delete/123505/integrated
Del: useless -- https://master.php.net/note/delete/123505/useless
Del: bad code -- https://master.php.net/note/delete/123505/bad+code
Del: spam -- https://master.php.net/note/delete/123505/spam
Del: non-english -- https://master.php.net/note/delete/123505/non-english
Del: in docs -- https://master.php.net/note/delete/123505/in+docs
Del: other reasons-- https://master.php.net/note/delete/123505
Reject -- https://master.php.net/note/reject/123505
Search -- https://master.php.net/manage/user-notes.php