【发布时间】:2010-07-01 09:53:18
【问题描述】:
我想在 CakePhp 上限制我的数据库数据。它可以通过 find 命令进行限制,但我不知道是否可以限制我的使用。这是我的 posts_controller.php 文件中的代码:
function index() {
$this->Post->order = array('order'=>'Post.date DESC','limit'=>5);
$this->Post->recursive = 0;
$this->set('posts', $this->paginate());
}
【问题讨论】:
标签: cakephp cakephp-1.3