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