|
Your use of mysql_num_rows is incorrect.
Since you don't have a group by on your query, you end up with a count of all records matching the where criteria. In other words, you have 1 result, and that result is the number that match. Using a select without a count returns 2 records, which is why the mysql_num_rows shows that many.
You need to fetch the count from the $gbio.
|