条件分页的问题,第二页页码不显示

浏览:1021 发布日期:2013/10/31 分类:求助交流 关键字: 分页
代码如下: $praname = trim($_GET['praname']);

$where = array(
'prabook' => $_GET['prabook'],
'prasub' => $_GET['subject'],
'pravolume' => $_GET['pravolume'],
);


if($_GET['praname']) $where['praname'] = array('like','%'.$praname.'%');

import('ORG.Util.Page');
$pra = D('PracticeRelation')->where($where);
$count = $pra->count();
$Page = new Page($count,3);

$pradata = $pra->limit($Page->firstRow.','.$Page->listRows)->getPratice();

foreach ($where as $key => $val) {
$Page->parameter.="$key=".urlencode($val).'&';
}

$page->parameter.="praname=$praname";

$show = $Page->show();

第一页 的页码和查询出来的数据正常,第二页的数据也正常,但是页码不显示,
当我把
foreach ($where as $key => $val) {
$Page->parameter.="$key=".urlencode($val).'&';
}
注释掉,第二页的页码就能正常显示,同时页码的链接也多了很多参数,包括表单_hash_,
请哪位大神帮我看看哪里出错了啊
网站使用了UTF8,在中文搜索结果不准确,可有什么方法?
最佳答案
评论() 相关
后面还有条评论,点击查看>>