itflow-org / itflow

Free and open-source web application for MSPs. Unifies IT documentation, ticketing, invoicing.
https://itflow.org
GNU General Public License v3.0
525 stars 143 forks source link

Tidy - Ticket_view_all SQL query + possible pagination #933

Closed wrongecho closed 3 months ago

wrongecho commented 3 months ago

L30 = $all_tickets = mysqli_query($mysqli, "SELECT * FROM tickets LEFT JOIN contacts ON ticket_contact_id = contact_id WHERE $ticket_status_snippet AND ticket_client_id = '$session_client_id' ORDER BY ticket_id DESC");

For efficiency, this should only request the fields required to show the ticket number, subject, contact and status. We should also consider pagination if possible?

--

2023-02-01 - Created draft 2024-04-07 - Promoted to issue