odbc query with single quote in string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux