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 ?
11-07-2012, 01:37 AM
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
11-07-2012, 02:29 AM
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.
11-07-2012, 05:47 AM
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 :)