我想在第二个 while 循环的帮助下打印信息,但它只运行一次。
while($nextDate<$currentDate)
{
$nextDate=date('Y-m-d',strtotime('+ 6 days',strtotime($weekDate)));
$qM="select count(*) as count ,Deposit.DepositNo, Deposit.DepositDate,
sum(DepositItem.Amount) as Amount,DAmount
from DepositItem
inner join Deposit on Deposit.DepositNo=DepositItem.DepositNo
where Deposit.DepositDate>='".$weekDate."' and Deposit.DepositDate<='".$nextDate."' group by Deposit.DepositNo
order by Deposit.DepositNo desc";
$connM=new dbconfig();
$connM->connectdb();
$connM->execute($qM);
$amt=0;
$damt=0;
while($rowsM =$connM->fetch_row())
{
$amt=$amt+$rowsM['Amount'];
$damt=$damt+$rowsM['DAmount'];
}
}