php - CakePHP multiple time and condition with price not working -


i have query in cakephp , not working. have record in db when remove inner price condition return result not working price.

select `car`.`id`, `car`.`title`, `car`.`description`, `car`.`image`, `car`.`state`,      `car`.`state_code`, `car`.`city`, `car`.`zipcode`, `car`.`person_name`, `car`.`email`,      `car`.`phone`, `car`.`mobile`, `car`.`ad_type`, `car`.`ad_status`, `car`.`make`,      `car`.`model`, `car`.`year`, `car`.`conditiion`, `car`.`transmision`, `car`.`color`,      `car`.`fuel`, `car`.`body`, `car`.`doors`, `car`.`mileage`, `car`.`price`,      `car`.`accessories`, `car`.`security`, `car`.`created`, `car`.`user_id`  `portal_carsnew`.`cars` `car`  `car`.`ad_status` = '1'      , `car`.`make` = 'ferrari'      , `car`.`model` = '458 italia'      , `car`.`state` = 'new york'      , `car`.`city` = 'albany' , ((`car`.`price` < 95000)      , (`car`.`price` > 0))  order `car`.`id`  desc limit 10 

use cakephp find method select records table try bellow code

$this->car->find('all', array(      'conditions' => array(          'car.ad_status' => 1,          'car.make' => 'ferrari',          'car.model' => '458 italia',          'car.state' => 'new york',          'car.city' => 'albany',          'car.price >' =>0,          'car.price <' =>95000        ),        'order'=> 'id desc',        'limit' => 10  )); 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -