// 搜索查询
if($_REQUEST['cid'] !== '-'){
$cid = $_REQUEST['cid'];
}
$where = array();
if($_REQUEST['search']){
$schti
$schAuthor = $_REQUEST['schAuthor']; // 作者
$schTime = urldecode($_REQUEST['schTime']); //时间
$time = strtotime($schTime);
$schStatus = $_REQUEST['schti
if($schti
$where['ti
}
if($schAuthor){
$where['author'] = array('like','%'.$schAuthor.'%');
}
if($schTime){
$where['pubtime'] = array('egt',$time);
}
if($schStatus !== '-' && $schStatus == 0){
$where['status'] = 0;
}
if(!empty($schStatus) && $schStatus == 1){
$where['status'] = 1;
}
}
if($cid){
$where['cid'] = $cid;
}
$count = $article->where($where)->count();
$Page = new Page($count,1);
$Page->parameter='';
//foreach($where as $key=>$val) {
//$Page->parameter .= "$key=".urlencode($val).'&';
//}
$result = $article->field('id,ti
var_dump($article->getLastSql());
当我使用 这个来传递分页参数时,点击下页时,使用$_GET 却获取不到值
foreach($where as $key=>$val) {
$Page->parameter .= "$key=".urlencode($val).'&';
}
而把 上面的 改成 :$page->parameter = '' 这个分页参数的值写为空时,我的搜索功能 ,便可以使用了。。。。
这个与手册里说的明显不符合 ,
敢问各位大侠高手 可遇到过类似的问题 ,
求个给位大神给个指导。。。。。[code]
最佳答案