PROTECTED]
Sent: Tuesday, June 24, 2003 6:19 PM
To: Doug Thompson
Cc: Becoming Digital; PHP-DB
Subject: Re: [PHP-DB] Rand() Emulation
Im probably not making myself clear.
Ultimately, my goal is to emulate mysql's ->
SELECT * FROM TABLE ORDER BY RAND() LIMIT (X)
for other databases tha
Becoming Digital wrote:
Ultimately, my goal is to emulate mysql's ->
SELECT * FROM TABLE ORDER BY RAND() LIMIT (X)
for other databases that do not support RAND().
Which are those?
Currently mySQL, PostgreSQL, and MSSQL.
To me the idea above would work, but it hinges on if that rand colum
On Wednesday 25 June 2003 00:19, Gerard Samuel wrote:
> Im probably not making myself clear.
> Ultimately, my goal is to emulate mysql's ->
> SELECT * FROM TABLE ORDER BY RAND() LIMIT (X)
>
> for other databases that do not support RAND(). So using variations of
> php's rand(), wouldn't make sense
ry/EGDXEBBWTYUU
- Original Message -
From: "Gerard Samuel" <[EMAIL PROTECTED]>
To: "Doug Thompson" <[EMAIL PROTECTED]>
Cc: "Becoming Digital" <[EMAIL PROTECTED]>; "PHP-DB"
<[EMAIL PROTECTED]>
Sent: Tuesday, 24 June, 2003 12
Yes its more than possible to do as you suggested, but as you implied,
not very friendly,
when it comes to large result sets...
Roedel, Mark wrote:
Might it be simpler, since you're assuming the presence of PHP anyway,
to just read your entire result set into an array and then shuffle() it
and t
l [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 24, 2003 11:19 AM
> To: Doug Thompson
> Cc: Becoming Digital; PHP-DB
> Subject: Re: [PHP-DB] Rand() Emulation
>
>
> Im probably not making myself clear.
> Ultimately, my goal is to emulate mysql's ->
> SELECT *
Im probably not making myself clear.
Ultimately, my goal is to emulate mysql's ->
SELECT * FROM TABLE ORDER BY RAND() LIMIT (X)
for other databases that do not support RAND(). So using variations of
php's rand(), wouldn't make sense,
as it only picks one value out of a range of values, that are n
An incredible interpretation of
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).
Doug
On Tue, 24 Jun 2003 11:14:55 -0400, Gerard Samuel wro
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 abo
ingdigital.com
Did I help you? Want to show your thanks?
www.amazon.com/o/registry/EGDXEBBWTYUU
- Original Message -
From: "Gerard Samuel" <[EMAIL PROTECTED]>
To: "PHP-DB" <[EMAIL PROTECTED]>
Sent: Tuesday, 24 June, 2003 02:56
Subject: [PHP-DB] Rand() E
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???
Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
11 matches
Mail list logo