> When you say,
> Order by RAND()
> I would think the "Order by" construct expects a column name.
> In your case, it gets a decimal value.
> How does "Order by" treat decimal values?
> Oh, I just checked the manual:
> In MySQL Version 3.23, you can, however, do: SELECT * FROM
> table_n
When you say,
Order by RAND()
I would think the "Order by" construct expects a column name.
In your case, it gets a decimal value.
How does "Order by" treat decimal values?
Oh, I just checked the manual:
In MySQL Version 3.23, you can, however, do: SELECT * FROM table_name ORDER BY RAND()
I st
SELECT RANDOM name FROM table
or
SELECT name FROM table ORDER BY RANDOM LIMIT 1
not tested, used at your own free will.
--
me
- Original Message -
From: "mm fernandez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 14, 2002 11:37 PM
Subject: [PHP] retrieving random da
> can you teach me how to retrieve random data from my
> database? like for example...i have a list of names on my
> database and i'd like to retrieve only one name at a
> time..randomly. how do i go about this?
This is really a database question rather than a php question and you
haven't
4 matches
Mail list logo