OK i have a search field so, if someone search for "green day" the result will be, "green", "green day", "green tree" but because the serch contains 2 elements, in this case "green" and "day" the script will search for names containing "day" as well, so "day" will return "day", "day light", "green day"(again), etc
So my question is how can I prevent at the moment of displays results names displaing twice ?
this is what i got maybe I need to do something else
if($_POST['searching']){
$i=0;
$lookin = explode(" ", $_POST['bsname']); //if there's 2+ words will make an array
$count = sizeof($lookin); //coun the ziseof the array
while($i < $count){
$sql = mysql_query("SELECT * FROM bands WHERE bandname LIKE '%$lookin[$i]%'");
$i++;
while($row = mysql_fetch_array($sql)){
extract($row);
$t++;
$result .= showresults();
}
}
}
Thanks in advance.