while loop- will this work?
| From: | SpyProductions Support Team | Date: | Thu, 30 Jan 2003 17:56:49 +0000 |
| Subject: | while loop- will this work? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-133671@lists.php.net to get a copy of this message | ||
Should this work?
$f1 = rand(999,99999999999);
while($check_sid = mysql_query("SELECT * FROM that_table WHERE this =
'$f1'")){
$f1 = rand(999,99999999999);
}
i.e. put the random number in a loop to check and make sure it is already
not in use?
Thanks,
-Mike