Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我正在为我的项目使用 cakephp,但是当时我从自定义查询生成结果时遇到了问题,我不知道如何将该结果传递给分页。所以请帮助我。
提前致谢。
这在书中有所介绍(http://book.cakephp.org/view/249/Custom-Query-Pagination)
基本上,您将在要从中获取数据的模型中覆盖分页。如果它会弄乱模型,只需创建一个使用同一个表的新自定义模型并将分页覆盖放在那里。