#1 蓝ッLánY
假设TestID = 4没有分页-------->
$requestlogCls = spClass('lib_requestlog');
$TestID = $this -> spArgs('TestID');
$sqlCall = 'select *,count(IP) AS total from trequestlog WHERE RequestPath LIKE "/askiq/?TestID='.$TestID.'%" OR RequestPath LIKE "/askiq/main_index_TestID_'.$TestID.'%" GROUP BY IP';
$result = $this -> result = $requestlogCls -> findSql($sqlCall);
有分页-———— >
$requestlogCls = spClass('lib_requestlog');
$TestID = $this -> spArgs('TestID');
$sqlCall = 'select *,count(IP) AS total from trequestlog WHERE RequestPath LIKE "/askiq/?TestID='.$TestID.'%" OR RequestPath LIKE "/askiq /main_index_TestID_'.$TestID.'%" GROUP BY IP';
$result = $this -> result = $requestlogCls -> spPager($this->spArgs('page', 1), 10) -> findSql($sqlCall);
$this-> pager = $requestlogCls -> spPager() -> getPager() ; //开启分页
问:为什么有分页的时候,全部数据都查询出来了,TestID=4的条件不生效??
2014-11-21 09:35:14