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