问题描述
此代码的问题是它计算数据库中所有月份的所有数据。不是从本月的本月第一天到本月的当前日期……有人可以帮我吗。
<tbody>
<?php
$FullTotal = 0;
while($rowF = $resultX -> fetch_assoc()){// registerfighter
$totalPlus = 0;
//table start
?>
<tr>
<td><?php echo $rowF["UserName"] ?></td>
<?php
$resultY-> data_seek(0);
while($rowY = $resultY -> fetch_assoc()){ // by addplan
$resultR -> data_seek(0);
while($rowR = $resultR -> fetch_assoc()){ // by record
if ($first_date <= $rowR["SubmitDate"] && $last_date <= $rowR["SubmitDate"]){
// this the problems...it not work
if( ($rowF["UserID"]===$rowR["UserIDD"]) and
(($rowR["No_Plan"]) === '1' and
($rowY["No_Plan"] === $rowR['No_Plan']))) {
$total = ($rowR["UserInputNEW"] + $rowR["UserInputNMP"]);
$totalPlus = $totalPlus + $total;
$FullTotal = $FullTotal + $total;
}
}
}
}
?>
<td><?php echo $totalPlus; ?></td>
</tr>
<?php
//table end
} ?>
<td colspan="1"> Total </td>
<td colspan="1"> <?php echo $FullTotal?></td>
</tbody>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)