mirror of
https://github.com/itflow-org/itflow
synced 2026-08-10 09:37:15 +00:00
Query Optimization: Select only needed columns instead of SELECT * on looped queries
This commit is contained in:
@@ -171,7 +171,7 @@ ob_start();
|
||||
<option value="">- Contact -</option>
|
||||
<?php
|
||||
|
||||
$sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_archived_at IS NULL AND contact_client_id = $client_id ORDER BY contact_name ASC");
|
||||
$sql_contacts = mysqli_query($mysqli, "SELECT contact_id, contact_name FROM contacts WHERE contact_archived_at IS NULL AND contact_client_id = $client_id ORDER BY contact_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_contacts)) {
|
||||
$contact_id = $row['contact_id'];
|
||||
$contact_name = escapeHtml($row['contact_name']);
|
||||
|
||||
Reference in New Issue
Block a user