odbc query with single quote in string

From: Date: Wed, 05 Feb 2003 00:15:36 +0000
Subject: odbc query with single quote in string
Groups: php.db 
Request: Send a blank email to php-db+get-25437@lists.php.net to get a copy of this message
I'm having problem querying a table with a field value containing an appostropy, please help. Using ODBC to connect MSAcess database. $mQuery = "CustomerID='$mCust'"; $mCur2 = odbc_do( $mCnx, "select Login from Emails where $mQuery" ); When it hits "O'Donald, James", I get error in odbc_exec(). I tried variations of $mQuery, including: $mQuery = addslashes( $mQuery ); ------------------------------------------------- This mail sent through ISOT. To find out more about ISOT, visit http://isot.com

« previous php.db (#25437) next »