mirror of
https://github.com/itflow-org/itflow
synced 2026-09-21 22:21:15 +00:00
Query Optimization: Select only needed columns instead of SELECT * on looped queries
This commit is contained in:
@@ -29,7 +29,7 @@ ob_start();
|
||||
<select class="form-control" name="vendor_template_id" required>
|
||||
<option value="">- Select Template -</option>
|
||||
<?php
|
||||
$sql_vendor_templates = mysqli_query($mysqli, "SELECT * FROM vendor_templates WHERE vendor_template_archived_at IS NULL ORDER BY vendor_template_name ASC");
|
||||
$sql_vendor_templates = mysqli_query($mysqli, "SELECT vendor_template_id, vendor_template_name FROM vendor_templates WHERE vendor_template_archived_at IS NULL ORDER BY vendor_template_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_vendor_templates)) {
|
||||
$vendor_template_id = intval($row['vendor_template_id']);
|
||||
$vendor_template_name = escapeHtml($row['vendor_template_name']);
|
||||
|
||||
Reference in New Issue
Block a user