Hey all.. I was thinking incorrectly in my first statement.. It would appear that this needs to be two SQL statements, since I don't know the GameNumber, until I run the statement..
In the first statement, I find the Game Number (There could be more then one game, tied to a phone number)..
In the second statement, I'm trying to check the Gamenumbers, to make sure that the status = 1 (Only one phone number per active game at a time)..
But my for loop to iterate through any Game Number's would overwrite itself each time.. Not really gonna work
Any help would be appreciated.
As always, I apprecitate the help on the forums, it makes learning a new language much easier..
Thanks
David
Code: Select all
$query = "SELECT `Game Number` FROM `TeamInformation` WHERE `PhoneNumber` = $subj";
$resultOne = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($resultOne,MYSQL_NUM) ;
$size = count($row);
for($i=0;$i<$size;$i++){
$queryTwo = "SELECT `Game Number` FROM `Game Information` WHERE `Game Number` = $row[0] AND `Status` = 1";
$resultTwo = mysql_query($queryTwo) or die(mysql_error());
}