Search multiple columns...
Posted: Wed Jul 06, 2011 1:17 pm
I want to search record in multiple fields(Like Name, Number,Email)... When I put any search string in textbox result should be displayed (Display all that records which is satisfying search term.) . I had tried folowing script but it won't work... can anybody help...
$str=$_GET['s'];
$sql = "SELECT * FROM login WHERE name LIKE '%$str%' ¦¦ Number LIKE '%str%' ¦¦ Email LIKE '%$str%'";
$res = mysql_query($sql, $link) or die($sql);
Hope for positive reply asap...
Sagar...
$str=$_GET['s'];
$sql = "SELECT * FROM login WHERE name LIKE '%$str%' ¦¦ Number LIKE '%str%' ¦¦ Email LIKE '%$str%'";
$res = mysql_query($sql, $link) or die($sql);
Hope for positive reply asap...
Sagar...