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";
  }
 }

i guess this is what you're trying to do:

$searchStmt = "SELECT 1 from division1rank where team_id = $team_id"; //i'd
prefer using bind variable here....
... snipped ...
if ($row = mysql_fetch_object($result)) {
  echo "It is in here";
} else {
  echo "We'll need to add it to the table.
}

i hope this will help






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to