title: cakephp search and paginate between date
body: <p>I'm trying to modify this code to implement a search in my application 
  <a href="http://mrphp.com.au/code/search-forms-cakephp" rel="nofollow">http://mrphp.com.au/code/search-forms-cakephp</a></p>
  
  <p>the code work but I'm trying to add a filter by date </p>
  
  <p>and this filter doesn't work...</p>
  
  <p>this is my code</p>
  
  <pre><code>    if(isset($this-&gt;passedArgs['Search.data1']) ) {
      $data1=$this-&gt;passedArgs['Search.data1'];
      $this-&gt;log($data1,LOG_DEBUG);
  
      if(isset($this-&gt;passedArgs['Search.data2']) ) {
          $data2=$this-&gt;passedArgs['Search.data2'];
      }
          else {
          $data2=$this-&gt;passedArgs['Search.data1'];
  
      }
  
      $this-&gt;paginate['conditions'][] = array('Report.data BETWEEN ? AND ?' =&gt; array($data1,$data2));
  </code></pre>
  
  <p>}</p>
  
  <p>the url is like index/Search.data1:2011-05-19/Search.data2:2011-05-26</p>
  
  <p>any ideas?</p>
  
  <p>thanks</p>