Sup,
    In the newer versions of mySQL, you can get random results like

SELECT id FROM table ORDER BY rand() LIMIT 0,1

SL.



----- Original Message -----
From: "James, Yz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 2:55 PM
Subject: [PHP] SQL - Select rand() ?


> Hi Guys,
>
> If I wanted to retrieve just one field randomly from a MySQL table, would
I
> just use something like:
>
> "SELECT RAND(id) FROM table .... LIMIT 0,1" ?
>
> I suppose the best thing for me to do would be to try it, but I am fast
> losing the will to stay awake ;)
>
> Thanks, as always,
>
> James.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to