Many thanks Thomas and Maciek. I'll try removing mt_srand to start with,
and if that doesn't work out I'll put in the uniqueness check.
Cheers,
Gordon.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Use a database query to verify the random number has not been used before.
$number_checker = 1;
while ($number_checker != 0){
#insert your $random_number code
$query = "SELECT COUNT(*) AS total FROM some_table WHERE
random_number_field = '$random_number'";
$result = mysq
Gordon McKeown wrote:
Apologies, my mail client was supposed to line-wrap that for me
-
Hi,
I'm currently experiencing a problem with a phpBB board that appears
to be due to the way random number generation works in PHP. I have
posted on serveral phpBB boards and have received no answers, s
Apologies, my mail client was supposed to line-wrap that for me
-
Hi,
I'm currently experiencing a problem with a phpBB board that appears
to be due to the way random number generation works in PHP. I have
posted on serveral phpBB boards and have received no answers, so I
think I need to un
4 matches
Mail list logo