Paginate TEMPORARY TABLE in Cakephp?

旧街凉风 提交于 2019-12-08 05:23:29

you dont need a model for your temporary table if you have respected the conventions for the tables' names, so "temp_table" wont work, cause the name must be plural.

Let's say that your temporary table is called "temp_prices" (i'm not using prefixes on tables) ,the name of the Model should be "TempPrice". To paginate the table use this on your controller

$this->loadModel('TempPrice'); //will load the model on the controller
$this->paginate['TempPrice'] = array(); //you can change the pagination options here
$resp = $this->paginate('TempPrices');

Good Luck

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!