我有一个用于打印TOTAL REPORT的表,它确实有错误。我认为这个错误来自于这一行,因为当我开始输入该代码时,它会导致错误,请帮助! 这是我的PHP代码
<?php
$con=mysql_connect("localhost","root","")or die(mysql_error());
$db=mysql_select_db('project')or die(mysql_error());
$query=mysql_query("SELECT * from reservation ")or die(mysql_error());
while($row=mysql_fetch_array($query)){
?>
<tr>
<td><?php echo $row['firstname']. ' ' .$row['lastname'] ?></td>
<td><?php echo $row['address'] ?></td>
<td><?php echo $row['arrival'] ?></td>
<td><?php echo $row['departure'] ?></td>
<td><?php echo $row3['qty'] ?></td>
<td><?php echo 'PHP ' . number_format(floatval($row['payable'])); ?></td>
<td><?php echo $row['status'] ?></td>
<td><?php echo $row['confirmation'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php
$result3 = mysql_query("SELECT qty FROM rooinventory") or die(mysql_error());
while ($rows3 = mysql_fetch_array($result)) {
?>
<?php
$result = mysql_query("SELECT SUM(payable) FROM reservation") or die(mysql_error());
while ($rows = mysql_fetch_array($result)) {
?>
<?php }
$result1 = mysql_query("SELECT SUM(payable) FROM reservation") or die(mysql_error());
while ($rows1 = mysql_fetch_array($result1)) {
?>
<div class="pull-right">
<div class="span">
<div class="alert alert-info"><i class="icon-credit-card icon-large"></i> Total Amount: PHP <?php echo number_format(floatval($rows1['SUM(payable)'])); ?></div>
</div>
</div>
</center>
答案 0 :(得分:1)
<?php }
}
?>
在</center>
代码