0

我正在使用 CakeDC https://github.com/CakeDC/search的搜索插件(到目前为止工作正常)。我想执行一个搜索,其中两个日期字段用于在 mysql 数据库中搜索值之间的值,但我无法让它工作。

我怎样才能做到这一点?

我发现没有工作示例,文档让我感到困惑。

--编辑:查看代码:

[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]
4

0 回答 0