thinkphp自带的分页 查询数据时怎么使用where条件

浏览:1897 发布日期:2013/08/03 分类:求助交流
import("ORG.Util.Page");
        $model = M("videoarticles");
        $page = new Page($model->where('articleTypeId = 2')->count(),50);
//这个where不起作用
        $result = $model->order('articleId desc')->limit("{$page->firstRow},{$page->listRows}")->select();
        
        $this->assign("pagelist",$page->show());//页码列表
最佳答案
评论( 相关
后面还有条评论,点击查看>>