Question
random results and paging
Hi guys, I have query which returns random X numbers like:
SELECT field FROM table
ORDER BY NewId()
Now I want to display results in sequence by 2 using "<cfoutput startRow maxRows..>"
problem is when I display first two records and hit next page refresh and I get different query result set (they get randomized again so I am getting a lot of repeated records)
Any idea how to solve this, only thing that is coming to my mind is to cache query in session but... there must be better way.
Thanks
SELECT field FROM table
ORDER BY NewId()
Now I want to display results in sequence by 2 using "<cfoutput startRow maxRows..>"
problem is when I display first two records and hit next page refresh and I get different query result set (they get randomized again so I am getting a lot of repeated records)
Any idea how to solve this, only thing that is coming to my mind is to cache query in session but... there must be better way.
Thanks
