Random data from mysql
I want to fetch random questions from mysql in to my web page for this i have used RAND() function but the poblem is everytime i refresh my webpage data is randomizing but i want random data only once and it should not randomize again on page refresh.Can anyone help me please ?
the total rows should be big than your limit
if you view 10 rows in the page you must have more than 10 in your database
Store the results of the query in session data, and then only actually run the query (and populate that session data) if the session data is empty.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Thank you so much NogDog it really worked for me as you said i stored my query in session variable and it executes only if that session is not set.
Thanks once again
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread