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:
johnnyq
2026-08-06 13:10:23 -04:00
parent b8c9d5b4cf
commit b3744e9ed5
247 changed files with 816 additions and 457 deletions

View File

@@ -19,7 +19,7 @@ $recurring_invoices_sql = mysqli_query($mysqli, "SELECT * FROM recurring_invoice
);
// Get Payment Provide Details
$payment_provider_sql = mysqli_query($mysqli, "SELECT * FROM payment_providers WHERE payment_provider_active = 1 LIMIT 1");
$payment_provider_sql = mysqli_query($mysqli, "SELECT payment_provider_id, payment_provider_name, payment_provider_threshold FROM payment_providers WHERE payment_provider_active = 1 LIMIT 1");
$row = mysqli_fetch_assoc($payment_provider_sql);
$payment_provider_id = intval($row['payment_provider_id']);
$payment_provider_name = escapeHtml($row['payment_provider_name']);
@@ -74,7 +74,7 @@ $payment_provider_threshold = floatval($row['payment_provider_threshold']);
<td><?= ucwords($recurring_invoice_frequency) ?>ly</td>
<?php if ($payment_provider_id) { ?>
<td>
<?php $sql = mysqli_query($mysqli, "SELECT * FROM client_saved_payment_methods WHERE saved_payment_client_id = $session_client_id");
<?php $sql = mysqli_query($mysqli, "SELECT saved_payment_description, saved_payment_id FROM client_saved_payment_methods WHERE saved_payment_client_id = $session_client_id");
if (mysqli_num_rows($sql) > 0) { ?>
<form class="form" action="post.php" method="post">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">