• Expression #1 of ORDER BY clause is not in SELECT list, references column 'admin_lvk.h.ord' which is not in SELECT list; this is incompatible with DISTINCT in query: SELECT DISTINCT SQL_CALC_FOUND_ROWS h.id as id, h.rel as pid FROM cms3_hierarchy h, cms3_permissions p, cms3_hierarchy_relations hr, cms3_objects o WHERE h.type_id IN (55) AND h.lang_id = '5' AND h.is_deleted = '0' AND h.is_active = '1' AND (p.rel_id = h.id AND p.level & 1 AND p.owner_id IN(335)) AND h.id = hr.child_id AND (hr.level <= 3 AND hr.rel_id = '883') AND h.obj_id = o.id ORDER BY h.ord ASC