if ($this->input->get('beds'))
$where['Bedrooms'] = $this->input->get('beds');
if ($this->input->get('baths'))
$where['Bathrooms'] = $this->input->get('baths');
$min_price = ($this->input->get('min_price'))
? $this->input->get('min_price')
: '0';
$max_price = ($this->input->get('max_price'))
? $this->input->get('max_price')
: '10000000';
$q = $this->db->select("*")
->where('ListingPrice <=', $max_price)
->where('ListingPrice >=', $min_price)
->limit(10)
->get();
Do you? You can trust that all the values are there.
The error is:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE ListingPrice <= '100000' AND ListingPrice >= '0' LIMIT 10' at line 2