Re: Rand() Emulation

From: Date: Tue, 24 Jun 2003 15:48:25 +0000
Subject: Re: Rand() Emulation
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-28862@lists.php.net to get a copy of this message
An incredible interpretation of <quote> If called without the optional min, max arguments rand() returns a pseudo-random value between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for example, use rand (5, 15). </quote> Doug On Tue, 24 Jun 2003 11:14:55 -0400, Gerard Samuel wrote: >Doesn't really cut it when you do not know a min and max value, or want >to extract a random range of numbers. > >Becoming Digital wrote: > >>>Im trying to figure out a way to emulate mysql's RAND() function to be >>>cross database compatible via php. >>>Has anyone done anything similar to this??? >>> >>> >> >>How about PHP's rand() function? >>http://us2.php.net/manual/en/function.rand.php >> >>Edward Dudlik >>Becoming Digital >>www.becomingdigital.com >> >>Did I help you? Want to show your thanks? >>www.amazon.com/o/registry/EGDXEBBWTYUU >> > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#28862) next »