So is the value a zero? Why not set its initial value to 1, so you get
a result set with some rows in it?
SELECT ... FROM ... LIMIT 0 returns no rows, hence mysql_num_rows() is
tossing an error.
That said, if there is any chance there will/could be an empty
recordset, you should always test for that before doing anything else
with the result.
|