Insert dynamical exam result of each student

Course Queries Competitions/Entrance Exams 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Competitions/Entrance Exams related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I have problem with inserting dynamical exam into mysql database. I don't know how to explain in word so this my code for example:

I have table exam this is my exam table structure:

exam table

+----+-----------+
| id | exam_name |
+----+-----------+
|  1 | run test  |
|  2 | swim test |
+----+-----------+

student table :

+----+-------------+
| id |   student   |
+----+-------------+
|  1 | student one |
|  2 | student two |
+----+-------------+

The problem is how to insert into table exam result, for example student one pass exam run test but fail for swim test. so the table exam result will show like this:

+---------+------------+--------+
| id_exam | id_student | status |
+---------+------------+--------+
|       1 |          1 |      1 |
|       2 |          1 |      0 |
+---------+------------+--------+

This is how i fetch every single exam and student into html table to give result of each student:

 class='wp-list-table widefat fixed striped posts'>
      
         class="bgth manage-column ss-list-width1">Participan Name
           class="bgth manage-column ss-list-width1">Complited Pool Requirement
           class="bgth manage-column ss-list-width1">Complited Theory Exam
           class="bgth manage-column ss-list-width1">Medical Sertificate Checked
     class="bgth manage-column ss-list-width" colspan="2">Action
      
   type='hidden' name='exam_total' value='3'> type='hidden' name='exam_names' value='[{"id":"1","exam_name":"Complited Pool Requirement"},{"id":"2","exam_name":"Complited Theory Exam"},{"id":"3","exam_name":"Medical Sertificate Checked"}]'> class='manage-column ss-list-width'>Handri angga riawan
         type='hidden' value='1' name='x-id[]'> class='manage-column ss-list-width'>
           type='checkbox' name='Complited_Pool_Requirement[]' value='1'>check if pass
           type='hidden' name='id_exam[]' value='1' >
           class='manage-column ss-list-width'>
           type='checkbox' name='Complited_Theory_Exam[]' value='1'>check if pass
           type='hidden' name='id_exam[]' value='2' >
           class='manage-column ss-list-width'>
           type='checkbox' name='Medical_Sertificate_Checked[]' value='1'
                                                
                                                
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community