I have a view like that:

What I want is when I click on the button, it will execute a select query:
SELECT discounts.product_id, products.product_name,
sum(products.product_price - discounts.product_discount) as total_Amount,
count(orders.order_id) as total_Number
FROM products
inner join discounts on products.product_id = discounts.product_id
inner join orders on discounts.discount_id = orders.discount_id
where discounts.start_time >= **FromTextBox** and discounts.end_time <= **ToTextBox**
group by discounts.product_id,products.product_name
FromTextBox and ToTextBox are values from 2 textboxes.
This is in my controller:
....
$option['fields']= array('Discount.product_id','Product.product_name','benefit','number');
//$option['conditions']=array('Discount.start_time >'=>array('')); //where I put values from view
$option['group'] = array('Discount.product_id','Product.product_name');
$products = $this->Order->find('all',$option);
$this->set('products',$products);
And my view:
<label class="control-label">From</label>
<div class="controls input-append date" id="dp1" data-date="" data-date-format="dd MM yyyy" data-link-field="dtp_input2" data-link-format="yyyy-mm-dd">
<input size="16" type="text" value="" readonly> <-- where I put textbox
<span class="add-on"><i class="icon-remove"></i></span>
<span class="add-on"><i class="icon-th"></i></span>
</div>
<label class="control-label">To</label>
<div class="controls input-append date" id="dp2" data-date="" data-date-format="dd MM yyyy" data-link-field="dtp_input2" data-link-format="yyyy-mm-dd">
<input size="16" type="text" value="" readonly> <-- where I put textbox
<span class="add-on"><i class="icon-remove"></i></span>
<span class="add-on"><i class="icon-th"></i></span>
</div>
<div>
<?php echo $this->Form->button('A Button'); ?>
</div>
Two textboxes are used Bootstrap datepicker. Please help me! thanks in advance.