Unknown column 'hoteles' in 'where clause': SELECT * FROM propiedades WHERE id = hoteles ORDER BY alta DESC