thinkphp 文字 筛选 字段 都在一个表里面 thinkphpselect 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 主要问题是 where 里面的条件不会写 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(); // 输出模板}大概是这个样子,楼主看看是否有用 里面的<span>去掉,想加红的,结果放到php代码块里了 如果是可以把分页改对成数组分页。$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写查询条件 <volist name="list" id="vo"><a>{$vo['Position']}</a></volist> 筛选 读取出的结果 那么 a 怎么给 $Position=$this->_param('Position');//接收参数 $Recruitment=$this->_param('Recruitment');//接收参数 值得???? 求PHP后台POST数据源码 php程序员招聘 (工作地区:北京) ecshop 跟随着漂浮的一个客服代码 安装xampp,启动不了apache服务 dedeCMS 返回值问题 我自已做的翻页功能,但是有一个问题解决不了,请朋友帮帮忙。 我崩溃了,输出PHP图像之前明明没输出,怎么会提示错误呢? 版主能帮忙解密下php吗?这是程序 在服务器上下载文件出现了这样的情况,希望大家能帮忙看看,谢谢了 PHP入门看什么书好点 有java基础 求大神们推荐 为什么jqgrid用php显示不了数据 按照一定条件选择数据后,如果有数据存在,出现弹窗,如何实现。
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(); // 输出模板
}大概是这个样子,楼主看看是否有用
$Page = new \Think\Page($count,20);
$show = $Page->show();// 分页显示输出
$data=array_slice($list,$Page->firstRow,$Page->listRows);
$this->assign("list",$data);where写查询条件
那么 a 怎么给
$Position=$this->_param('Position');//接收参数
$Recruitment=$this->_param('Recruitment');//接收参数 值得????