Mysql 如何在有连接的cakephp中添加限制
下面是我从表中获取记录的代码Mysql 如何在有连接的cakephp中添加限制,mysql,cakephp-2.3,Mysql,Cakephp 2.3,下面是我从表中获取记录的代码 $joins=array( array( 'table' => 'users', 'alias' => 'User', 'type' => 'LEFT', 'conditions' => array( 'User.id= Notification
$joins=array(
array(
'table' => 'users',
'alias' => 'User',
'type' => 'LEFT',
'conditions' => array(
'User.id= Notification.UserId'
)
)
);
// fetching all records
$returnArray = $this->find('all', array(
'fields' => array('Notification.id','User.Name'),
'joins' => $joins,
'order' => 'Notification.id DESC',
'limit'=>'100',
));
在上面的代码中,我的限制不起作用,因为我正在使用连接。有谁能告诉我如何在cakephp中使用连接限制吗。
是否有其他方法来增加限额?请尽快告诉我
提前感谢我对蛋糕不熟悉,但请尝试整数而不是字符串
$returnArray = $this->find('all', array(
'fields' => array('Notification.id','User.Name'),
'joins' => $joins,
'order' => 'Notification.id DESC',
'limit'=> 100,
));