This seems like it should be REALLY easy, but I don't know how to do it. If I use PHP to query a MySQL database, how do I determine if there are no matches? I tried

if (!$result)...

etc., but that only seems to work if the query itself fails, not if there are no matches. Thanks in advance!