Inscription output if the fields in the database are empty

The page displays a list of students from the MySQL database, how can I make it so that the inscription “You have not added a single student!” is displayed if the cells are empty? Or rather, there is no data in the database yet.

I ended up doing this:

if (mysql_num_rows($result) < 1) {print "   ";}

Answer 1, authority 100%

This is usually done using mysql_affected_rows()


Answer 2, authority 100%

Like this
if (count($students) < 1) print “There are no students”;