DB Error #1054
[SELECT A1.number
AS number
, A1.ticket_id
AS ticket_id
, A1.source
AS source
, A1.ticket_pid
AS ticket_pid
, A1.flags
AS flags
, A1.created
AS created
, B2.subject
AS cdata__subject
, A1.isoverdue
AS isoverdue
, B3.name
AS user__name
, B2.priority
AS cdata__priority
, B4.firstname
AS staff__firstname
, B4.lastname
AS staff__lastname
, B5.name
AS team__name
, A1.team_id
AS team_id
, A1.isanswered
= '0' AS 2GkBZxz
, (SELECT COUNT(R0.id
) AS count
FROM ostbc_thread
Q7 JOIN ostbc_ticket
Q8 ON (Q7.object_type
= 'T' AND Q7.object_id
= Q8.ticket_id
) LEFT JOIN ostbc_thread_entry
R0 ON (Q7.id
= R0.thread_id
) WHERE Q8.ticket_id
= A1.ticket_id
AND NOT R0.flags
& 4 != 0) AS _thread_count, (SELECT COUNT(R1.id
) AS count
FROM ostbc_thread
Q7 JOIN ostbc_ticket
Q8 ON (Q7.object_type
= 'T' AND Q7.object_id
= Q8.ticket_id
) LEFT JOIN ostbc_thread_entry
R0 ON (Q7.id
= R0.thread_id
) LEFT JOIN ostbc_attachment
R1 ON (R1.type
= 'H' AND R0.id
= R1.object_id
) WHERE Q8.ticket_id
= A1.ticket_id
AND R1.inline
= 0) AS _att_count, COALESCE(B4.firstname
, B4.lastname
, B5.name
, 'zzz') AS assignee
FROM ostbc_ticket
A1 JOIN ostbc_ticket_status
A2 ON (A1.status_id
= A2.id
) LEFT JOIN ostbc_thread
A3 ON (A3.object_type
= 'T' AND A1.ticket_id
= A3.object_id
) LEFT JOIN ostbc_thread_referral
A4 ON (A3.id
= A4.thread_id
) LEFT JOIN ostbc_staff
A5 ON (A4.object_type
= 'S' AND A4.object_id
= A5.staff_id
) LEFT JOIN ostbc_thread
A6 ON (A1.ticket_id
= A6.object_id
AND A6.object_type
= 'C') LEFT JOIN ostbc_thread_referral
A7 ON (A6.id
= A7.thread_id
) LEFT JOIN ostbc_staff
A8 ON (A7.object_type
= 'S' AND A7.object_id
= A8.staff_id
) LEFT JOIN ostbc_department
B0 ON (A4.object_type
= 'D' AND A4.object_id
= B0.id
) LEFT JOIN ostbc_department
B1 ON (A7.object_type
= 'D' AND A7.object_id
= B1.id
) LEFT JOIN ostbc_ticket__cdata
B2 ON (A1.ticket_id
= B2.ticket_id
) LEFT JOIN ostbc_user
B3 ON (A1.user_id
= B3.id
) LEFT JOIN ostbc_staff
B4 ON (A1.staff_id
= B4.staff_id
) LEFT JOIN ostbc_team
B5 ON (A1.team_id
= B5.team_id
) WHERE A2.id
IN (1) AND A2.state
= 'open' AND ((A2.state
= 'open' AND (A1.staff_id
= 11 OR A5.staff_id
= 11 OR A6.object_type
= 'C' AND A8.staff_id
= 11)) OR A1.dept_id
IN (1, 3) OR B0.id
IN (1, 3) OR A6.object_type
= 'C' AND B1.id
IN (1, 3)) AND (A1.ticket_pid
IS NULL OR A1.flags
& 8 != 0) GROUP BY A1.ticket_id
ORDER BY A1.created
DESC LIMIT 50] Unknown column 'B2.priority' in 'field list'<br /> <br /> ---- Backtrace ----<br /> #0 (root)/include/mysqli.php(211): osTicket->logDBError()<br /> #1 (root)/include/class.orm.php(3482): db_query()<br /> #2 (root)/include/class.orm.php(3529): MySqlExecutor->execute()<br /> #3 (root)/include/class.orm.php(2104): MySqlExecutor->getArray()<br /> #4 (root)/include/class.orm.php(2054): HashArrayIterator->{closure}()<br /> #5 (root)/include/class.orm.php(2033): CallbackSimpleIterator->next()<br /> #6 (root)/include/class.orm.php(2042): CallbackSimpleIterator->rewind()<br /> #7 (root)/include/class.orm.php(1713): CallbackSimpleIterator->valid()<br /> #8 (root)/include/class.orm.php(1723): CachedResultSet->fillTo()<br /> #9 (root)/include/class.orm.php(1739): CachedResultSet->asArray()<br /> #10 (root)/include/staff/templates/queue-tickets.tmpl.php(258): CachedResultSet->getIterator()<br /> #11 (root)/scp/tickets.php(569): require_once('/home/aspenm/he...')<br /> #12 {main}