From the above image i have two types of questions 1.Passage Based(type_id=1) and another Normal Questions(type_id=0) 2.Normal questions can can come from rand() but where one passage question came all the passage questions has to come one after one.
i want to call the questions randomly but when one passage question come in that the question should come in sequence related to that passage how can i do that
This my query of calling questions.:
$select=$conn->query("select * from tbl_testquestion where cat_id='".$cat."' and subcat_id='".$sub_cat."' and qu_status='1' ORDER BY RAND() LIMIT $q_limit ");
The view part questions is like this in the below image passage question appeared in the Rand() So in the next question same passage related question has to appear
Aucun commentaire:
Enregistrer un commentaire