Re: [PHP] Re: Random Numbers..

2003-12-08 Thread Curt Zirzow
* Thus wrote Burrito Warrior ([EMAIL PROTECTED]): > > This would: > /* selecting a random record, where n = 1. Works fine on small tables */ > mysql> SELECT value FROM table ORDER BY RAND() LIMIT n; > > /* selecting a random record. This is good on large tables if numbering > sequence is used *

RE: [PHP] Re: Random Numbers..

2003-12-06 Thread Burrito Warrior
No, I wouldn't do that. What if another quote gets deleted. The new assigned QuoteID would be 6 and your solution wouldn't work. This would: /* selecting a random record, where n = 1. Works fine on small tables */ mysql> SELECT value FROM table ORDER BY RAND() LIMIT n; /* selecting a random re

RE: [PHP] Re: Random numbers in a cronned script?

2002-09-13 Thread Martin Towell
if you seed it with unix time then you'll alway be seeding with something different in most cases, the random numbers that are generated will be random enough just my AU2c worth Martin -Original Message- From: lallous [mailto:[EMAIL PROTECTED]] Sent: Friday, September 13, 2002 6:51 PM To