Posted By

robv on 03/24/09


Tagged

mysql php search


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

jamesming
jfherring
pezland
nmakarov
vali29
Premier13


Escape String For Like Query


 / Published in: PHP
 

URL: http://thisisrobv.com

Simple way to escape string for LIKE statements, useful for searches.

  1. addcslashes(mysql_real_escape_string($_POST['search']), '%_')

Report this snippet  

You need to login to post a comment.