mysql - Custom Query Pagination Cakephp -
I have a custom query in my controller and I would like to apply the custom query pagination found on KPPRGR but their example is like me Does anyone help me endorse this result in my viewpoint:
$ cars = $ this- & gt; Car- & gt; Query ("Car.id, Car.make, Car.model, car. Year, car decryption, car image. Car images of cars in the car's internal car thumbnail car are included in the car image. Default_IJG_ID = car image.id where Car. Order ''. $ Category. '' Order by car, Credited DESC limit 10 ''); $ this-> Set ('car', $ car);
Confirm in your model and apply PageGen:
, $ Field, $ command, $ limit, $ page, $ recurring, additional $) {return $ this-> query ('SELECT ...');} function paginateCount ($ terms, $ recurring, additional $) {Return $ the-> Query ('SELECT COUNT (.....');}
See also Paginate Function in: Cake / Libby / Controller / Controller. PPP
Comments
Post a Comment