我在cakePHP中有一些代码会产生错误.
原文链接:https://www.f2er.com/php/135939.html这是PHP控制器:
$this->loadModel( 'Vote' ); //Newly added by amit start $vote=$this->Vote->getVote($id,$uid); $this->set('vote',$vote); $voteCount = count($vote); $this->set('voteCount',$voteCount); $voteShow = $this->Vote->find('all',array( 'fields' => array('SUM(Vote.score) AS score','count(id) as countId'),'conditions'=>array('Vote.type_id'=>$id),)); $this->set('voteShow',$voteShow);
模型:
public function getVote($id,$uid) { if (empty($conditions)) $conditions = array('Vote.type' => 'blog','Vote.type_id' => $id,'Vote.user_id' => $uid); $users = $this->find('all',array('conditions' => $conditions,'order' => 'Vote.id desc' )); return $users; }
Error : An internal error has occurred
这个错误是什么意思?