脚本宝典收集整理的这篇文章主要介绍了Cakephp错误:发生了内部错误,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
这是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
以上是脚本宝典为你收集整理的Cakephp错误:发生了内部错误全部内容,希望文章能够帮你解决Cakephp错误:发生了内部错误所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。