class CategoryViewModel extends ViewModel{
public $viewFields = array(
'Category' => array('id','pID','path','top','type','modelID','disabled'),//要求按TOP排序
'CategoryExpand' => array('cID','title','languageID','_on' => 'Category.id = CategoryExpand.cID'),
);
}查询代码 $categoryList = D('CategoryView') -> order('top = 0 asc')-> select();
dump($categoryList );//打印的是array(0) {}如果order('top asc') 就是正常的。是不是视图模型不支持 order('top = 0 asc') 这样的排序啊。
求高手帮忙看看,小弟感激涕零,在线等, 谢谢了
最佳答案