I need to retrieve open tickets available to an agent, but directly from the DB. So far, I have this:
SELECT * FROM ost_ticket
WHERE team_id
IN (SELECT team_id
FROM ost_team_member
WHERE staff_id
=6) and status_id
=1
But this only gets basic data from the ticket, not form data.
I have been staring at the tables and also PHP, but cannot find the link between form data (ost_form_entry_values) and the tickets.
Please help.