Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Gordon Mckeown
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

Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread M. Sokolewicz
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,

RE: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Thomas S. Crum - AAA Web Solution, Inc.
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 =

Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread Gordon Mckeown
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