开发者

cake php pagination

开发者 https://www.devze.com 2023-01-24 07:13 出处:网络
I have a website running on cakephp. I want to implement pagination there. I have a result set in an array. and I have included the pagi开发者_运维知识库nator helper.

I have a website running on cakephp. I want to implement pagination there.

I have a result set in an array. and I have included the pagi开发者_运维知识库nator helper.

Can someone tell me how to apply pagination to my result.


The CakePHP Cookbook has a very detailed section about pagination. Also covers how to write pagination for custom data. The Cookbook itself is highly recommended while developing in Cake.

http://book.cakephp.org/view/164/Pagination


If you already have a result set in an array and you want to paginate, then you already made a find() call and you can’t paginate that (at least not using the cake’s paginator). You need to call the pagination method in replacement to the find.

0

精彩评论

暂无评论...
验证码 换一张
取 消