1
I’m making a query in the database and need to get information between two column values valor
within the specified quantity.
For example: Between the valorMinimo
300 and valorMaximo
600
$imovel = $this->Imovel->find('all', array(
'conditions' => array(
'valor' => $queries['valorMin'], 'valor' => $queries['valorMax']
)
));
Performance note:
BETWEEN
is less efficient than making a>=
and<=
.– Beterraba