mirror of
https://github.com/itflow-org/itflow
synced 2026-08-15 12:05:11 +00:00
More sweeps to replace select * with actual returned column names dramatically reduces php memory usage and speeds up processing dramatically especially in the crons since they run all the time
This commit is contained in:
@@ -6,7 +6,10 @@ $ticket_id = intval($_GET['ticket_id']);
|
||||
|
||||
$ticket_sql = mysqli_query(
|
||||
$mysqli,
|
||||
"SELECT * FROM tickets
|
||||
"SELECT asset_id, asset_name, asset_type, category_name, client_id, client_rate, contact_id,
|
||||
contact_name, ticket_assigned_to, ticket_billable, ticket_category, ticket_created_at,
|
||||
ticket_created_by, ticket_first_response_at, ticket_number, ticket_onsite, ticket_prefix,
|
||||
ticket_priority, ticket_resolved_at, ticket_subject, user_name FROM tickets
|
||||
LEFT JOIN clients ON ticket_client_id = client_id
|
||||
LEFT JOIN contacts ON ticket_contact_id = contact_id
|
||||
LEFT JOIN users ON ticket_assigned_to = user_id
|
||||
@@ -107,7 +110,7 @@ ob_start();
|
||||
<select class="form-control select2" name="category">
|
||||
<option value="">- Select a Category -</option>
|
||||
<?php
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Income' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||
$sql = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Income' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$category_id = intval($row['category_id']);
|
||||
$category_name = escapeHtml($row['category_name']);
|
||||
@@ -213,7 +216,7 @@ ob_start();
|
||||
<select class="form-control select2" name="tax_id" required>
|
||||
<option value="0">None</option>
|
||||
<?php
|
||||
$taxes_sql = mysqli_query($mysqli, "SELECT * FROM taxes WHERE tax_archived_at IS NULL ORDER BY tax_name ASC");
|
||||
$taxes_sql = mysqli_query($mysqli, "SELECT tax_id, tax_name, tax_percent FROM taxes WHERE tax_archived_at IS NULL ORDER BY tax_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($taxes_sql)) {
|
||||
$tax_id_select = intval($row['tax_id']);
|
||||
$tax_name = escapeHtml($row['tax_name']);
|
||||
|
||||
Reference in New Issue
Block a user