Home >Backend Development >PHP Tutorial >统计数据时为何显示三个

统计数据时为何显示三个

WBOY
WBOYOriginal
2016-06-13 11:56:31836browse

统计数据时为什么显示三个

……省略


         $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))
         {
?>
                


                      
  
                         //按科目统计学员
  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)..为什么会重复两次? }
  ?>

……省略
------解决方案--------------------
 是吗,那我就不客气了
------解决方案--------------------
跟版主抢分,鸭梨很大啊
------解决方案--------------------
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn