It will be more helpful if you print out the SQL before you run it. That way you might even spot the error yourself. It might even be worth showing us what the error is. A few points though.
- mysql_query doesn't return data
- select * will return multiple fields not one field
- you are likely to get more than one row returned
- if you use single quotes then variables won't be translated
- even in Spanish (?) your table names look bad
- what happens if a value hasn't been entered for a field
Something like the following would work better but I can't test it on my end. I'd suggest reading a book or looking at a few web sites on PHP / MySQL:
Code:
if($quartos=="Tudo") {
$sql = "SELECT *
FROM _Form_Nr_2
WHERE preco_between BETWEEN '$preco1' AND '$preco2'
and quartos IN ('1','2','3','4','Kitinet')
and bairro='$bairro'
and cidade='$cidade'
and category='$category' ";
$result = mysql_query( $sql ) or die(mysql_error());
while($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo $row[0] . " " . $row[1] . " " . $row[2] . "<br>";
}
}