#1 Seul
http://www.speedphp.com/thread-3798-1-1.html 按照这个手册的操作后
if($price || $procat || $type || $act_from || $q)
$itemsTemp = $pros->spPager($page,56)->findAll($where,$order);//$itemsTemp = $pros->spCache(480)->getmypage($where,$order,$page,56);
else
$itemsTemp = $pros->spCache(480)->getmypage($where.' and classification=1',$order,$page,56);//$itemsTemp = $pros->spPager($page,56)->findAll($where.' and classification=1',$order);//这个数据就是首页和标准翻页的数据集
if(!$procat && !$type && !$price && !$act_from && !$q){
$itemsC1 = $pros->spCache(480)->findAll($where.' and classification=2',$order);//$pros->spCache(480)->findAll($where.' and classification=2',$order);
$itemsC2 = $pros->spCache(480)->findAll($where.' and classification=3',$order);//$pros->spPager($page,56)->findAll($where,$order);
}
上面是取数据的代码一共3个分类的数据
function getmypage($conditions,$order, $page, $pageSize){
return $this->spPager($page,$pageSize)->findAll($conditions,$order);
}
然后上面的是去页码数据的函数
翻页使用spCache后翻到第二页然后在点首页,$pros->spPager()->getPager();就成空的了,求解啊!
2015-08-13 00:09:13