0
我試圖修改此代碼來實現我的應用程序 http://mrphp.com.au/code/search-forms-cakephpCakePHP的搜索和日期間分頁
代碼工作搜索,但我想按日期添加過濾器
這過濾器不工作...
這是我的代碼
if(isset($this->passedArgs['Search.data1'])) {
$data1=$this->passedArgs['Search.data1'];
$this->log($data1,LOG_DEBUG);
if(isset($this->passedArgs['Search.data2'])) {
$data2=$this->passedArgs['Search.data2'];
}
else {
$data2=$this->passedArgs['Search.data1'];
}
$this->paginate['conditions'][] = array('Report.data BETWEEN ? AND ?' => array($data1,$data2));
}
url就像index/Search.data1:2011-05-19/Search.data2:2011-05-26
有什麼想法嗎?
感謝
感謝您的支持! – Matteo 2011-05-26 15:36:50