while loop- will this work?

From: 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

« previous php.general (#133671) next »