Code:
do { $rand = rand(124,987); $Db_user = substr($Db_name,0,4).$rand; // Test for unique new contact name. $sql = "SELECT * FROM clients WHERE user_id = '$Db_user'"; $result = mysql_query($sql) or die("could not execute FIND MEMBER query"); } while (mysql_num_rows($result) > 0);
Leave a comment: