Hola y gracias por responder, pero me salió un error.
"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 'ORDER BY propiedades.id_propiedad' at line 1 "
La consulta completa que ejecuté es esta:
Código PHP:
$result = mysql_query("SELECT * FROM propiedades, tipopropiedad, operacion
INNER JOIN fotospropiedades ON propiedades.cod_propiedad = fotospropiedades.cod_propiedad
WHERE propiedades.id_tipopropiedad = tipopropiedad.id_tipopropiedad
AND propiedades.id_operacion = operacion.id_operacion
AND propiedades.id_tipopropiedad = $id_tipopropiedad
ORDER BY propiedades.id_propiedad", $con) or die(mysql_error());
Le saqué el ORDER BY y me tiró este error:
"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
'' at line 1 "
Me podrían decir dónde estoy haciendo mal la consulta?
Muchas gracias.