note 79914 added to function.odbc-connect
| From: | OmahaJohn at osu1 dot php dot net | Date: | Wed, 19 Dec 2007 16:19:57 +0000 |
| Subject: | note 79914 added to function.odbc-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-133781@lists.php.net to get a copy of this message | ||
I was getting an inferiating error message about SQLDirectExec not having sufficient parameters
(07001). I did a lot of research, and a lot of random testing. I finally found the issue was that,
when doing a WHERE clause on a string value (Access db, Text field) you need to use single quotes.
For example, this <b>wont</b> work
$query = "SELECT tSerialNumbers.* FROM tSerialNumbers WHERE ((SERNUM) =
\"$sernum\");";
This <b>will</b>
$query = "SELECT tSerialNumbers.* FROM tSerialNumbers WHERE ((SERNUM) =
'$sernum');";
Why? I have no idea. But it solved my problem and I'm finally making progress again.
----
Server IP: 64.71.164.2
Probable Submitter: 70.168.37.216
----
Manual Page -- http://www.php.net/manual/en/function.odbc-connect.php
Edit -- https://master.php.net/note/edit/79914
Del: integrated -- https://master.php.net/note/delete/79914/integrated
Del: useless -- https://master.php.net/note/delete/79914/useless
Del: bad code -- https://master.php.net/note/delete/79914/bad+code
Del: spam -- https://master.php.net/note/delete/79914/spam
Del: non-english -- https://master.php.net/note/delete/79914/non-english
Del: in docs -- https://master.php.net/note/delete/79914/in+docs
Del: other reasons-- https://master.php.net/note/delete/79914
Reject -- https://master.php.net/note/reject/79914
Search -- https://master.php.net/manage/user-notes.php