mercredi 4 avril 2018

Accessing random rows from database without repetition

I have designed a quiz scenario using MySQL database as my backend.

I have a total of 20 questions and I would want to display them in random order from the database. I have tried :

SELECT * from mst_que ORDER BY RAND();

What the above query does is repeat few rows.




Aucun commentaire:

Enregistrer un commentaire