String SQL command escape : String Escape « String « PHP






String SQL command escape

       

<?php
$query = "SELECT quote FROM test WHERE \'ID\'=1";
$quote = stripslashes($query);
   
echo $quote;
?>

           
       








Related examples in the same category

1.To embed a single quote in a singly quoted string, escape it with a backslash
2.addslashes(): escapes quotes, double quotes, backslashes, and NULLs with backslashes
3.quotemeta(): escapes \ + * ? [ ^ ] ( $ )