I'm having problems executing a "do while loop" with two instances on one query. Its running only one instance, my snippet is as follows;
PHP Code:<?php do { ?>
<table width="100%" border="1" cellspacing="0" bordercolor="#000000">
<!--DWLayoutTable-->
<tr>
<td>LEADERSHIP AND MANAGEMENT ACADEMY </td>
</tr>
<tr>
<td>CANDIDATES' EXAMINATION RESULTS</td>
</tr>
<tr>
<td height="21" colspan="5" valign="top"><div align="center" class="style24">PROGRAMME: </div></td>
</tr>
<tr>
<td height="21" colspan="5" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td><?php echo $row_Recordset1['ssurname']; ?></td>
<td width="195" bgcolor="#CCCCCC" class="style1"><div align="center"><?php echo $row_Recordset1['sname']; ?></div></td>
<td width="193" bgcolor="#CCCCCC" class="style1"><div align="center"><?php echo $row_Recordset1['s_id']; ?> </div></td>
<td width="192" bgcolor="#CCCCCC" class="style1"><div align="center"></div></td>
<td width="197" bgcolor="#CCCCCC" class="style1"><div align="center"></div></td>
</tr>
<?php do { ?><tr>
<td class="style1"><div align="left"><?php echo $row_Recordset1['code']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset1['mark']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset1['classification']; ?></div></td>
<td><div align="center"><?php echo $row_Recordset1['year']; ?></div></td>
<td><div align="left"></div></td>
</tr><?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<tr>
<td><div align="left" class="style1">AGGREGATE:<?php echo $row_Recordset1['mark']; ?></div></td>
<td><div align="center">WEIGHTED AVERAGE: </div></td>
<td><div align="center">DEGREE CLASS: </div></td>
<td><div align="center">OVERALL:</div></td>
<td><div align="left"></div></td>
</tr>
<tr>
<td height="57" colspan="5" valign="top" bgcolor="#CCCCCC"><!--DWLayoutEmptyCell--> </td>
</tr>
</table><?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>


Reply With Quote



I'm glad to be back myself.


Bookmarks