That is fine that i need to let Paginator know which one you want. But i made grid layout with help of two model and when user click any field title it should be in sorted in ASC or DESC and also that those field is coming from different model.
On Sep 16, 2:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > To paginate anything but the first defined model you need to let > Paginator know which one you want. > Check out the Pagination chapter in the > book.http://book.cakephp.org/view/165/Controller-Setup > > On Sep 15, 3:03 pm,nayan<[EMAIL PROTECTED]> wrote: > > > i have wrote the following code to use mulitple model > > class AutoLinkExchangesController extends AppController { > > var $name = 'AutoLinkExchanges'; > > var $uses=array('AutoLinkExchange','AutoHyperLink'); > > > function admin_autohyperlink_index(){ > > > if(!empty($this->data)) > > { > > $criteria=NULL; > > list($order,$limit,$page) = $this->Pagination->init($criteria); > > $data = $this->AutoHyperLink->findAll($criteria, NULL, $order, > > $limit, $page); > > > } > > > it shows me the queryu with "ORDER BY `AutoLinkExchange`.`id` " but i > > am using AutoHyperLink model > > and one more thing when i change the position of model in uses like > > var $uses=array('AutoHyperLink','AutoLinkExchange'); > > then it does not show me any error and both model do not have any > > relation. > > Plz suggest me the solution...... > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---