我正在使用 cakephp 1.26。
我正在对 CakePHP 中的分页进行一些自学。
我已经在我的本地主机中测试了以下代码,它工作正常。
我对第二行代码做了一点改动,发现结果没有任何变化。
第一个版本:
$this->paginate=array('conditions'=>array('Testing.zero'=>'0'), 'limit' => 3);
$w = $this->paginate();
$this->set('postVariable', $w);
第二版:
$this->paginate=array('conditions'=>array('Testing.zero'=>'0'), 'limit' => 3);
$w = $this->paginate('Testing');
$this->set('postVariable', $w);
第三版:
$this->paginate=array('conditions'=>array('Testing.zero'=>'0'), 'limit' => 3);
$w = $this->paginate('helloworld');
$this->set('postVariable', $w);
第 4 个版本:
$this->paginate=array('conditions'=>array('Testing.zero'=>'0'), 'limit' => 3);
$w = $this->paginate($this->helloworld);
$this->set('postVariable', $w);
我不知道应该在 $this->paginate() 的括号中输入什么