我们用大I接收到我们get过来的栏目页的id然后通过文章的ar_cateid 来判断是不是属于该栏目下的,如果文章表ar_cateid = 栏目表的cate_id 那么就可以选出我们要查找的信息, 然后再遍历到视图即可... <?php namespace Home\Controller; use Think\Controller; class ListsController extends CommonController { public function lists(){ //获取栏目的i
public function index(){ import("@.ORG.Page"); //导入分页类 $Dao = M(); $count = count($Dao->query("SELECT * FROM ofuser WHERE uid IN (SELECT uid FROM ofid WHERE uid ='1')"));//总计条数 $Page = new Page($count, 10); //一页中的数量为5 $list = $Dao-&