A very popular MySQL idiom is to use the return value of mysql_num_rows() to reflect the number of rows that will be returned by the last SELECT statement that was issued.