I want to print information with the help of second while loop, but it is running only once.
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'];
}
}
}is missing OR its just TYPO.$currentDate?