Checking if table empty

2002-03-14 Thread Steve Buehler
I have a strange, but probably easy to fix problem. I need to check to see if something is in a table...that part is easy, but if the table is empty, it doesn't go through my while statement so that I can create something in it. I am sure that if there was something in the table, that I

Re: Checking if table empty

2002-03-14 Thread Steve Buehler
Subject: Checking if table empty : I have a strange, but probably easy to fix problem. I need to check to see : if something is in a table...that part is easy, but if the table is empty, : it doesn't go through my while statement so that I can create something : in it. I am sure

Checking if table empty

2002-03-14 Thread Sammy Lau
as you said, the table is empty. mysql_fetch_object should return NULL. that's why the block in the while statement doesn't got executed. while (($row = mysql_fetch_object($result))){ if($row-team_id == $team_id){ echo It is in there; }else{ echo We will need to add it to the table;