Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

mysql underscore escape not working?

$
0
0
$name='john_doe';
$name=str_replace('_','\_',$name);


$sql="select * from table where customer='".$name."'";


in the table, i have john_doe, john_smith, etc.

I am not getting the expected result?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>