RowdyBurns
asked on
outputting results in a random order with MySQL and PHP
Hi experts,
I have a form which gives the user an options as to how to display the results: the latest entry, most highly rated, and randomly. With the fields I have, the first two can be done with a simple ORDER BY command in the sql, but outputting the results in a random order is a little more complex... I'm assuming that there isn't an SQL statement which will do this, so any idea on some PHP which might build the results randomly, e.g. into an array?
Thanks!
I have a form which gives the user an options as to how to display the results: the latest entry, most highly rated, and randomly. With the fields I have, the first two can be done with a simple ORDER BY command in the sql, but outputting the results in a random order is a little more complex... I'm assuming that there isn't an SQL statement which will do this, so any idea on some PHP which might build the results randomly, e.g. into an array?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.