Invalid query : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'marine_output.type' in 'order clause' Whole query: SELECT marine_archive_output.* FROM marine_archive_output WHERE marine_archive_output.ident <> '' AND (marine_archive_output.ident = :ident) ORDER BY marine_output.type DESC LIMIT 25 OFFSET 50