mirror of
https://github.com/itflow-org/itflow
synced 2026-08-10 17:47:16 +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:
@@ -8,7 +8,9 @@ $client_id = intval($_GET['id']);
|
||||
|
||||
enforceClientAccess();
|
||||
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_id = $client_id LIMIT 1");
|
||||
$sql = mysqli_query($mysqli, "SELECT client_abbreviation, client_archived_at, client_created_at, client_lead, client_name,
|
||||
client_net_terms, client_notes, client_rate, client_referral, client_tax_id_number,
|
||||
client_type, client_website FROM clients WHERE client_id = $client_id LIMIT 1");
|
||||
|
||||
$row = mysqli_fetch_assoc($sql);
|
||||
$client_name = escapeHtml($row['client_name']);
|
||||
@@ -132,7 +134,7 @@ ob_start();
|
||||
<option value="">- Select Referral -</option>
|
||||
<?php
|
||||
|
||||
$referral_sql = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Referral' AND (category_archived_at > '$client_created_at' OR category_archived_at IS NULL) ORDER BY category_name ASC");
|
||||
$referral_sql = mysqli_query($mysqli, "SELECT category_name FROM categories WHERE category_type = 'Referral' AND (category_archived_at > '$client_created_at' OR category_archived_at IS NULL) ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($referral_sql)) {
|
||||
$referral = escapeHtml($row['category_name']);
|
||||
?>
|
||||
@@ -175,7 +177,7 @@ ob_start();
|
||||
<select class="form-control select2" name="tags[]" data-placeholder="Add some tags" multiple>
|
||||
<?php
|
||||
|
||||
$sql_tags_select = mysqli_query($mysqli, "SELECT * FROM tags WHERE tag_type = 1 ORDER BY tag_name ASC");
|
||||
$sql_tags_select = mysqli_query($mysqli, "SELECT tag_id, tag_name FROM tags WHERE tag_type = 1 ORDER BY tag_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_tags_select)) {
|
||||
$tag_id_select = intval($row['tag_id']);
|
||||
$tag_name_select = escapeHtml($row['tag_name']);
|
||||
|
||||
Reference in New Issue
Block a user