View Single Post
Old 08-05-2006, 04:50 PM   #2
barney
Senior Member
 
barney's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 203
barney is on a distinguished road
Send a message via ICQ to barney Send a message via AIM to barney Send a message via Yahoo to barney
Default

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.
barney is offline   Reply With Quote