Pagination is not working in cakephp -


my code controller:

public $paginate = array(         'paramtype' => 'querystring',         'limit' => 3,     );   $this->paginate['comment'] = array(                            'conditions' => array('comment.post_id' => $this->params['id']));  $this->set('comments',$this->paginate('commant')); 

when

pr($this->paginate['comment'] = array(                                'conditions' => array('comment.post_id' => $this->params['id']))); exit;  

the output array

(     [conditions] => array         (             [response.claim_id] => 4         )  ) 

but instead of finding comment related post shows post db

once tried

pr($this->paginate['comment'] = array(                                    'conditions' => array('comment.id' => $this->params['id']))); exit; 

and result same

array      (         [conditions] => array             (                 [response.id] => 4             )      ) 

can 1 suggest me why pagination not woking

use

public $paginate = array(     'paramtype' => 'querystring',     'limit' => 3, );  

in controller

$this->set('comments',$this->paginate('response',                            array('response.claim_id' => $id))); 

in function

and define paginator component in controller


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -