> 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\'

Only if you pass that variable through a GET/POST/COOKIE operation and you
have magic_quotes_gpc enabled in your php.ini file.  Either turn
magic_quotes off or call stripslashes() on your string before passing it
to MySQL.

But, are you sure you want to be passing entire query strings between
pages?  Normally you would only pass the actual query arguments.  In your
case probably the 'string' part.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to