how can i write query in this situation: this is the query
$gdQuery = $conn->query("blah blah ");
i want to use the above query for while loop that is two time.
- is to retrive skillname (name)
- is to retrivestudent name (student_fname)
is it a correct approach if not how can i do that..?
<table>
<thead>
<th>Paricipant</th>
<?php while($gdData = $gdQuery->fetch_assoc()) { ?>
<th class="text-center"><?php echo $gdData['name']; ?></th> <?php } ?>
<th>Score</th>
</thead>
<tbody>
<tr>
<?php while($gdData = $gdQuery->fetch_assoc()) { ?>
<td><?php echo $gdData['student_fname']; ?></td> <?php } ?>
<td style="line-height:45px">Score</td>
</tbody>
</table>
My problem is when i write this the second while loop is not working