I'm using the search plugin from CakeDC https://github.com/CakeDC/search (works fine so far). I would like to perform a search where two date fields are used to search in a mysql database a between value but I cannot get it working.
How can I do that?
I found no working example and the documentation is confusing me.
--Edit: View code:
[html table stuff]
<td>
<?php
echo $this->Form->input('from', array(
'type' => 'date',
//'div' => false,
'dateFormat' => 'DMY',
'minYear' => 2013,
'maxYear' => date('Y'),
'style' => 'margin-right: 2px; margin-left: 2px',
'empty' => true,
'timeFormat' => null,
'selected' => array(
'day' => 1,
'month' => 1,
'year' => 2013
),
'empty' => false
));
?>
</td>
<td>
<?php
echo $this->Form->input('to', array(
'type' => 'date',
'div' => false,
'dateFormat' => 'DMY',
'minYear' => 2013,
'maxYear' => date('Y'),
'empty' => true,
'style' => 'margin-right: 2px; margin-left: 2px',
'timeFormat' => null,
'selected' => array(
'day' => date('D'),
'month' => date('M'),
'year' => date('Y')
),
'empty' => false
));
?>
</td>
[html table stuff]