Paginate query:
$this->paginate = array(
'conditions' => array(
// 'Product.soft_delete NOT' => 'on',
// 'Product.product_status NOT' => 'inactive',
// $conditions
'Product.original_price <=' => 77
),
'recursive' => 2,
// 'order' => $sort_by,
'paramType' => 'querystring',
'limit' => '25',
'maxLimit' => 100,
);
$records = $this->paginate('Product');
CakePHP adding single quote to original_price 77 so it is creating problems in number comparison.
Cakephp query output:
............LEFT JOIN `admin_mytab`.`seller_categories` AS `Seller_3` ON (`Product`.`seller_3` = `Seller_3`.`id`) WHERE `Product`.`original_price` <= '77' LIMIT 25
MySQL original_price is varchar field. 77 in quotes unable to compare with mysql field.
Any help would be appreciated.