I have a search query that works ad brings up results...What I want to do is, if there is no result, I want it to display the message "your search did not match anything etc.." I tried the "if" statement as below and it didn't work. The mysql query works properly...Please advise...
$query=mysql_query("SELECT * FROM events_usa WHERE city LIKE '%$trimmed1%' OR title LIKE '%$trimmed1%' OR description LIKE '%$trimmed1%' OR link LIKE '%$trimmed1%' ORDER BY sdate DESC LIMIT 8");
while ($row = mysql_fetch_array($query)) {
$idqq=$row['id'];
$categoryqq=$row['category'];
....
if(is_null($idqq))
{
echo "<span class='eventdisplay'>"."Your query did not match any data. Please go back and try again."."</span>";
}