you can used mysql_num_rows to check whether your table has
a record or not, if there is a no record, mysql_num_rows will be given 0 result example
$query_rslist = "SELECT * FROM users"; //this is your query
$result=mysql_query($query_rslist)
$count=mysql_num_rows($result) // count record on your query
then....
if($count=="0"){
echo "Sorry, there is no record"
}
good luck..😉