解决方案 »

  1.   

    主要问题是  where 里面的条件不会写
      

  2.   


    public function index(){
            $Data = M('zhaopin'); // 实例化Data数据对象
            import('ORG.Util.Page');// 导入分页类
           
            $map="1=1 ";//初始化条件变量
            $Position=$this->_param('Position');//接收参数
            $Recruitment=$this->_param('Recruitment');//接收参数
            if($Position<>''){
            $map.=" and Position='$Position'";
            }
            if($Recruitment<>''){
            $map.=" and Recruitment='$Recruitment'";
            }

            $count= $Data->where($map)->count();// 查询满足要求的总记录数
            $Page= new Page($count,20);// 实例化分页类 传入总记录数
            $nowPage = isset($_GET['p'])?$_GET['p']:1;
            $list = $Data->where($map)->order('shijian desc,id asc')->page($nowPage.','.$Page->listRows)->select();
            $show = $Page->show();// 分页显示输出
            $this->assign('count',$count);
            $this->assign('page',$show);// 赋值分页输出
            $this->assign('list',$list);// 赋值数据集
            $this->display(); // 输出模板
    }大概是这个样子,楼主看看是否有用
      

  3.   

    里面的<span>去掉,想加红的,结果放到php代码块里了
      

  4.   

    如果是可以把分页改对成数组分页。$count=count($list);
    $Page       = new \Think\Page($count,20);
    $show       = $Page->show();// 分页显示输出
    $data=array_slice($list,$Page->firstRow,$Page->listRows);
    $this->assign("list",$data);where写查询条件
      

  5.   

    <volist name="list" id="vo"><a>{$vo['Position']}</a></volist>   筛选  读取出的结果
     那么 a 怎么给
      $Position=$this->_param('Position');//接收参数
            $Recruitment=$this->_param('Recruitment');//接收参数 值得????