我有以下代码,其中数据库表中的数据显示在表中。但是在 2-3 条记录之后,它无法正确显示记录。
这是代码:
<tr>
<?php do { ?>
<td> </td>
<td><?php echo $row_Recordset1['notification']; ?></td>
<td><?php echo $row_Recordset1['online_date']; ?></td>
<td> </td>
<td> </td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
它生成以下输出:
行 HTML 输出为:
<form id="form1" name="form1" method="post" action="">
<table width="900" align="center" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="6"> </td>
<td colspan="5"><div align="center">Active Notifications </div></td>
<td rowspan="6"> </td>
</tr>
<tr>
<td colspan="5"> </td>
</tr>
<tr>
<td>No.</td>
<td>Notifications</td>
<td>Online Date </td>
<td colspan="2">Transactions</td>
</tr>
<tr>
<td> </td>
<td>Our New destinations are Countries.</td>
<td>2012-12-27</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>abcdefgh</td>
<td>2012-12-27</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Hi</td>
<td>2012-12-27</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>hello</td>
<td>2012-12-27</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="5"> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>