[PHP-DB] Random numbers?

2002-02-03 Thread Chris Payne
Hi there everyone, I need to generate a random number between 1 and 15 for insertion into a DB, I can easily do the DB side of it but what is the best method for quickly generating a random number between 1 and 15 (including 1 and 15 in the equation)? Thanks for all your help. Regards Chris

Re: [PHP-DB] Random numbers?

2002-02-03 Thread Patrik Wallstrom
On sön, 03 feb 2002, Chris Payne wrote: > Hi there everyone, > > I need to generate a random number between 1 and 15 for insertion into a > DB, I can easily do the DB side of it but what is the best method for > quickly generating a random number between 1 and 15 (including 1 and 15 > in the

Re: [PHP-DB] Random numbers?

2002-02-03 Thread Chris Payne
Hi there, That is absolutely PERFECT, thank you so much for that you are a lifesaver :-) Regards Chris Payne www.planetoxygene.com > On sön, 03 feb 2002, Chris Payne wrote: > > > Hi there everyone, > > > > I need to generate a random number between 1 and 15 for insertion into a > > DB, I can

[PHP-DB] Random numbers with range in mysql?

2002-09-28 Thread Leif K-Brooks
I'm trying to make "shops" that sell virtual objects. They restock once every 15 minutes. This is all set up. The problem is, I would like to have objects in these shops with a random chance of being restocked. My idea is to store two numbers in the restock list: chance, and outof. (For a

RE: [PHP-DB] Random numbers with range in mysql?

2002-09-28 Thread John W. Holmes
> I'm trying to make "shops" that sell virtual objects. They restock once > every 15 minutes. This is all set up. The problem is, I would like to > have objects in these shops with a random chance of being restocked. My > idea is to store two numbers in the restock list: chance, and outof. > (