Re: Rand() Emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux