Hey,
I have been screwing around with this code for around a day and am hitting a wall, any help would be appreciated.
Basically, I am working on a site that queries the DB for companies and the plans the company is offering, the DB is quite big (a few thousand records in each of the 20 tables)
The parameters are taken from the client in the form of a search box and usually gives around 1000 results per query, they results are then displayed like this:
company 1 [] plan [] plan [] plan [] plan company 2 [] plan [] plan [] plan company 3 [] plan company 4 [] plan [] plan
So far, no problems (even though the code and the design are mixed together in the page) but so far the code is getting the results grouping via $cno, which results in the lowest being displayed first which gives the first companies who joined an edge as they are always getting displayed.
Heres the kicker, he wants to have the same display as above....but randomly from the DB *while still* having pagination.. so new joined companies too get displayed and not shoved at the end of the results.
Choices:
1. ORDER_BY RAND(), and keep the full result set (or just the ids) in session
2. add another column, display_order, and update it at regular intervals to random values.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php