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 tab

Re: Checking if table empty

2002-03-14 Thread Steve Buehler
EMAIL PROTECTED]> >Sent: Thursday, 14 March, 2002 17:46 >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

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 wou