Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我们在控制器中有 $start-date = 2013-09-23 和 $end-date = 2013-09-28。现在我们必须得到在这个范围之间的这个字段的日期。示例:表字段修改日期:2013-09-22 然后将输出。
你的问题不是很清楚,但如果我明白了,你的问题是:
$this->YourModel->find->( 'all', array( 'conditions' => array( 'YourModel.modified BETWEEN ? AND ?' => array($start-date, $end-date) ) ) );