public function index(){
$cate = M('album');
$list = $cate->field("id,pid,title,path,description(path,'-',id) as bpath")->order('bpath')->select();
foreach($list as $key=>$value){
$list[$key]['count'] = count(explode('-',$value['bpath']));
}
dump($list);
$this->assign('alist',$list);
// $this->display();
}
SQLSTATE[42000]: Syntax error or access violation: 1305错误 最佳答案
