为什么这段代码后面的分页总是获得前面分页的数据?

#1 zf19870131

 
public function index()
{
  $this->home_news = spClass("money_news")->spPager($this->spArgs('home_pager', 1), 4)->findAll(array("type" => "魅力家居"), "date DESC","title, date, id");
  $this->home_pager = spClass("money_news")->spPager()->getPager();
  
  dump(spClass("video")->spPager($this->spArgs('home_video', 1), 4)->findAll(array("type" => "魅力家居"), "date DESC"));
//  $this->home_video = spClass("video")->spPager()->getPager();
  dump(spClass("video")->spPager()->getPager());
}


输出结果为:

Array(

    [0] => Array        (            [id] => 15            [type] => 魅力家居            [title] => 通过改革梵蒂冈梵蒂冈的            [addr] => fdggdfg            [photo] =>             [date] => 2010-05-18 16:02:14        )

   [1] => Array        (            [id] => 14            [type] => 魅力家居            [title] => gsgtr            [addr] => grtgrtg            [photo] =>             [date] => 2010-05-18 15:32:55        ))




Array(   

[total_count] => 7    [page_size] => 4    [total_page] => 2    [first_page] => 1    [prev_page] => 1    [next_page] => 2    [last_page] => 2    [current_page] => 1  

  [all_pages] => Array        (            [0] => 1            [1] => 2        )

)


那个数据结果为7的,是第一个sql的结果。我很奇怪,折腾了一天了。

2010-05-19 08:19:14

#2 jake

用sp 3

2010-05-19 09:05:16

#3 zf19870131

恩,我把前后顺序调换了一下就可以了。真奇怪。

2010-05-21 10:42:32