I have tried and it works, now I'm stumbling on this:
if ((isset($minusvalidos)){$result = mysql_query("SELECT * from DatosInmueble, Precios WHERE (DatosInmueble.Ref=Precios.Ref AND Localidad='$Localidad' AND $llegada != '0' AND maximo >= $maximo AND minusvalidos='$minusvalidos')", $link);}
else {$result = mysql_query("SELECT * from DatosInmueble, Precios WHERE (DatosInmueble.Ref=Precios.Ref AND Localidad='$Localidad' AND $llegada != '0' AND maximo >= $maximo)", $link);}
Is it possible to select the query depending if a variable has been seted?