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