Jump to content

Random rows


karldesign

Recommended Posts

Hi all,

 

I want to create a sql statement that returns the rows in a random order but will return all rows. It will never be more than 10 rows, so it shouldn't be too slow.

 

I do want to loop this though, so the rows need to be unique each time.

 

ie: I have rows 1-7 and I want to return them in a random order but don't duplicate (1, 5, 4, 2, 3, 7, 6 - is good 1, 2, 4, 6, 7, 7, 3 - is bad)

Link to comment
https://forums.phpfreaks.com/topic/36761-random-rows/
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.