Hey guys, this code is great. I was able to adjust 99% of what I needed. I have one request, which I hope is pretty simple.
I added time_spent to the table Ticket_Response. I wanted to add that to my Ticket View. I was uncertain on how to join that table. I took a stab at it.
$qselect = 'SELECT ticket.ticket_id,lock_id,ticketID,ticket.dept_id,ticket.staff_id,subject,name,ticket.email,dept_name,staff.username,time_spent '.
',status,source,isoverdue,ticket.created,pri.* ';
$qfrom=' FROM '.TICKET_TABLE.' ticket LEFT JOIN '.DEPT_TABLE.' dept ON ticket.dept_id=dept.dept_id '.
' LEFT JOIN '.TICKET_PRIORITY_TABLE.' pri ON ticket.priority_id=pri.priority_id '.
' LEFT JOIN '.TICKET_LOCK_TABLE.' tlock ON ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW() '.
' LEFT JOIN '.STAFF_TABLE.' staff ON ticket.staff_id=staff.staff_id';
' LEFT JOIN '.TICKET_RESPONSE_TABLE.' response ON ticket.staff_id=response.staff_id';
Any thoughts?