help on getting rid of \'
| From: | Hugh Danaher | Date: | Wed, 18 Jul 2001 08:45:33 +0000 |
| Subject: | help on getting rid of \' | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-58416@lists.php.net to get a copy of this message | ||
I am working with php and mysql and have the need to write a query like:
$sql_statement=mysql_query(" select * from table where column='string' ");
What comes out is:
select * from table where column=\'string\'
mysql doesn't like this one bit and I get the dreaded:
"Warning: Supplied argument is not a valid MySQL result resource in /www /... 3display.php on
line 41"
I've tried using settype($sql_statement,string) before (and after) the above statement and
still get the \'. Naturally, I've looked in the php manual online and found nothing
helpful on this subject. Please help the needy.
Hugh