我有一个棘手问题,我不知道如何解决这一问题,但我已经尝试过几个事情,但你知道。 因此,我要问:
/**
* Returns a list with all the months for the archive
*
* @return array
*/
public function Archive()
{
$q = "SELECT DISTINCT MONTH(`data`) AS `month`,YEAR(`data`) AS `year` FROM `posts` ORDER BY `data` DESC";
$all = $this->fetchAll($q);
if (count($all) > 0) {
foreach ($all as $info) {
$months[] = array( month_name =>$this->months($info[ month ]), year =>$info[ year ], month =>$info[ month ]);
}
return $months;
}else{
return false;
}
}
我的傲慢:
致命错误: 例外 Zend_Db_Statement_Exception with informSTATE[21,000]: 心脏病的违反:1241 操作中应包含一栏。
任何帮助?