CI框架代码转换
<br />$array = array();<br />while($row = mysql_fetch_array($result,MYSQL_ASSOC)){<br /> $key = date('Y年m月d日',$row['time']);<br /> $array[$key][]=$row;<br />}<br />
Salin selepas log masuk
请问这段代码怎么转为CI框架的?
------解决方案--------------------$array = array();
$query = $this->db->query("要执行的 SQL");
foreach ($query->result_array() as $row)
$key = date('Y年m月d日',$row['time']);
$array[$key][]=$row;
}