I have the following code:
$sql="SELECT * FROM imoveis WHERE
(suite LIKE '%".$suites."%'
OR banheiro LIKE '%".$banheiro."%'
OR quarto LIKE '%".$quarto."%'
OR garagem LIKE '%".$garagens."%')
AND (motivo LIKE '%".$tipo1."%'
OR tipo LIKE '%".$tipo."%')
AND cidade LIKE '%".$cidadd."%'
AND estado LIKE '%".$local."%'
AND preco >= '$valor'
AND tamanho <= '$tamanho' ";
$anunciarRadio=mysqli_query($conexao,$sql);
What I need is for me to return to the houses in the same city as my variable as determined by the amount of garage, suites, bathrooms, approximate rooms, $ value , and size greater than the $ size variable.
What am I doing wrong?
By putting the exact same values as those saved in the database it does not return anything ... Is it syntax or logic error?
When I put everything to or he returns but all come. I need a fine comb, but not so much, I need not prioritize some fields like bedrooms, bathrooms, garage, suite and the rest prioritize as being accurate ...