note 79914 deleted from function.odbc-connect by nlopess

From: Date: Wed, 19 Dec 2007 18:25:01 +0000
Subject: note 79914 deleted from function.odbc-connect by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133786@lists.php.net to get a copy of this message
Note Submitter: Omaha John ---- 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.

« previous php.notes (#133786) next »