【发布时间】:2010-07-05 13:02:30
【问题描述】:
我有一个从 mysql 获取数据的元素。这是我的工作代码:
$this->requestAction('posts/index/sort:id/direction:desc');
我只想抓取 id 1 和 6 之间的帖子。如何通过 requestAction 运行该查询?我尝试过的一些脚本如下。没有工作:
$this->requestAction('posts/index/sort:id/direction:desc', array('id between ? and ?' => array('1,6')));
或
$this->requestAction('posts/index/sort:id/between:1,6/direction:desc');
您可以在http://bake.yemeklog.com/ 看到我的项目我想要此代码用于第三列(过去 30 天的最爱)
【问题讨论】:
标签: cakephp cakephp-1.3