在PHP结果数组生成不正确的结果?

时间:2014-09-05 04:41:52

标签: php mysql codeigniter

enter image description here

这是我的桌子&我的查询是

$qrs=$select questionID,answer,count(answer) as answer_cnt 
  from `sg_finished_surveys` 
  WHERE  answer='$q' and questionID ='$questionID';   

foreach($qrs as $qrow)
 {  
  ['<?=$qrow['answer']?>',<?=$qrow['answer_cnt']?> ],       
 }

结果只会获得最后一个值

0 个答案:

没有答案