Skip to content

Commit

Permalink
Move query to where it's used
Browse files Browse the repository at this point in the history
  • Loading branch information
ellite committed Feb 23, 2024
1 parent 7c9bff8 commit 1e9e167
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,18 +298,6 @@
</div>
</section>

<?php
$sql = "SELECT * FROM payment_methods";
$result = $db->query($sql);

if ($result) {
$payments = array();
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
$payments[] = $row;
}
}
?>

<?php
$sql = "SELECT * FROM currencies";
$result = $db->query($sql);
Expand Down Expand Up @@ -472,6 +460,18 @@
</div>
</section>

<?php
$sql = "SELECT * FROM payment_methods";
$result = $db->query($sql);

if ($result) {
$payments = array();
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
$payments[] = $row;
}
}
?>

<section class="account-section">
<header>
<h2><?= translate('payment_methods', $i18n) ?></h2>
Expand Down

0 comments on commit 1e9e167

Please sign in to comment.