Hi,
I have a database table with several hundred rows. Each row has a status of either "on" or "off".
What I'd like to do is create a PHP page that will randomly select 5 rows from the db table, where the rows are "on". For example, you visit the page and it will display rows 2, 45, 122, 7, and 19. You hit your browser's Refresh button and it will display rows 98, 475, 13, 111, and 55.
One of the challenges is that the "off" rows will be randomly distributed among the "on" rows. So the "on" are not cleanly ordinal.
Any ideas of how to do this would be greatly appreciated.
Thanks in advance.
-Ben