Jump to content

ORDER by random?


phpretard

Recommended Posts

have a look here at mysql reference for RAND()

 

http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_rand

 

It looks like it may do the job.

 

SELECT * FROM quotation ORDER BY RAND()

 

may work but i have not tested.

 

Regards

Liam

Link to comment
https://forums.phpfreaks.com/topic/95191-order-by-random/#findComment-487582
Share on other sites

Dude...have no idea what I'm reading there...it looks impressive though. Thank you.

 

I want to display random ads down one side of a site I'm working on.  There are plenty of unique rows I can select.  Once selected, I need them to display randomly (not asc or desc).

I can do it javascript, but prefer php.

-Anthony

Link to comment
https://forums.phpfreaks.com/topic/95191-order-by-random/#findComment-487584
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.