#1 skfzc
我刚开始接触speedphp,现在用findsql分页,出现了问题,没有limit,各位给指导一下,是哪里的问题:$sql="select id,title,cp_img from cp where cp_img<>''";
if ($one<>""){
$sql=$sql." and hyone_id=".$one;
}
if ($two<>""){
$sql=$sql." and hytwo_id=".$two;
}
$sql=$sql." order by id desc";
$this->$row = $serv->spPager($this->spArgs('page', 1), 5)->findSql($sql);
$this->pager = $serv->spPager()->getPager();
echo $serv->dumpsql();
输出的结果是:
select id,title,cp_img from cp where cp_img<>'' and hyone_id=11 and hytwo_id=20 order by id desc
那个spPager不是能自己加上limit吗,怎么这个没有,是我哪里出错了吗?
2011-04-09 12:06:02