统计数据时为什么显示三个
……省略
<!-- 科目:start -->
<?php
$sql = "select kemu_id,name from ".$fdyu->table('oa_kemu')." where school_id=".$school_id." and parent_id=0 order by kemu_id asc";
$res = $db->query($sql);
if ($res)
{
while ($row = $db->fetchRow($res))
{
?>
<tr class="STYLE2">
<td height="40" rowspan="2" align="center" class="biankuan6">
<?php echo $row['name']; ?>
<?php
//按科目统计学员
foreach($arr_date as $val)
{
$sql_new = "select count(*) from " . $fdyu->table('oa_xueyuan') .
" as xy left join ".$fdyu->table('oa_banji')." as bj on xy.cur_banji_id=bj.banji_id " . $sql_where_b . " and bj.kemu_1=".$row['kemu_id'];
echo '(' . $db->getOne($sql_new) . ')';//
这里为什么显示(60)(60)(60)..为什么会重复两次? }
?>
……省略
------解决方案-------------------- 是吗,那我就不客气了
------解决方案--------------------跟版主抢分,鸭梨很大啊
------解决方案--------------------