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

Reply via email to