我有一个从 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 天的最爱)