$aAwardMem = $this->dao_raward->getAwardAndMem($where,'award_level asc',false,false,false,'award_level,count(award_level) as count',false,array('award_level')); award_level,count(award_level) as count 这里就灵活的运用了变量$from,将count放入其中,获取了数量. 很多sql是封装的,我们要…