I have a search that gets info from database. If there is no results I want form to say no results. Here is my code.
<?php
$raw_results = mysql_query("SELECT * FROM member
WHERE (`Name` LIKE '".$query."')") or die(mysql_error());
if(mysql_num_rows($raw_results) > 0) while($results = mysql_fetch_array($raw_results)) echo $results['Name']
?>
How do I add the no results via this code? I have tried adding this code to the end but it gives me an error.
}
else{
echo "No results";
}