note 41770 added to function.odbc-exec

From: Date: Wed, 21 Apr 2004 21:28:54 +0000
Subject: note 41770 added to function.odbc-exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-68487@lists.php.net to get a copy of this message
If a single quote exists within the field specified by your WHERE statement, ODBC fails because of a parsing error. Although it seems intuitive, using \" around the field does not work (\"$var\"). The only solution I found was to replace all single quotes in my field with two single quotes. ODBC interprets the first single quote as an escape character and interprets the second single quote as a literal. Thanks to http://www.devguru.com/features/knowledge_base/A100206.html for this tip. ---- Manual Page -- http://www.php.net/manual/en/function.odbc-exec.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41770 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41770&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41770&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68487) next »