replace all instances of mysqli_fetch_array with mysqli_fetch_assoc for better performance and memory usage

This commit is contained in:
johnnyq
2026-01-14 17:30:23 -05:00
parent cb8b99d6ae
commit 0a30300bde
361 changed files with 1880 additions and 1904 deletions

View File

@@ -29,7 +29,7 @@ $monthlyTotals = array_fill(1, 12, 0); // Initialize monthly totals for each mo
<select onchange="this.form.submit()" class="form-control" name="year">
<?php
while ($row = mysqli_fetch_array($sql_expense_years)) {
while ($row = mysqli_fetch_assoc($sql_expense_years)) {
$expense_year = $row['expense_year'];
?>
<option <?php if ($year == $expense_year) { ?> selected <?php } ?> > <?php echo $expense_year; ?></option>
@@ -85,7 +85,7 @@ $monthlyTotals = array_fill(1, 12, 0); // Initialize monthly totals for each mo
echo "<td class='text-right'>" . $categoryTotal . "</td>";
echo "</tr>";
}
// Displaying the monthly totals row
echo "<tr><td><strong>Total</strong></td>";
$grandTotal = 0;
@@ -104,4 +104,4 @@ $monthlyTotals = array_fill(1, 12, 0); // Initialize monthly totals for each mo
</div>
<?php require_once "../../includes/footer.php";
?>
?>