Skip to content

Commit

Permalink
Indent the query properly #2008
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemhall committed Aug 22, 2024
1 parent 440b771 commit 7c48252
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions code/web/Drivers/Koha.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,12 @@ public function getCheckouts(User $patron): array {
/** @noinspection SqlResolve */
/** @noinspection SqlDialectInspection */
$circulationRulesSql = "
SELECT * FROM circulation_rules
WHERE (categorycode IN ('$patronType', '*') OR categorycode IS NULL)
AND (itemtype IN('$itemType', '*') OR itemtype is null)
AND (branchcode IN ('$checkoutBranch', '*') OR branchcode IS NULL)
ORDER BY branchcode desc, categorycode desc, itemtype desc LIMIT 1";
SELECT * FROM circulation_rules
WHERE (categorycode IN ('$patronType', '*') OR categorycode IS NULL)
AND (itemtype IN('$itemType', '*') OR itemtype is null)
AND (branchcode IN ('$checkoutBranch', '*') OR branchcode IS NULL)
ORDER BY branchcode desc, categorycode desc, itemtype desc LIMIT 1
";
$circulationRulesRS = mysqli_query($this->dbConnection, $circulationRulesSql);
if ($circulationRulesRS !== false) {
$circulationRulesRow = $circulationRulesRS->fetch_assoc();
Expand Down

0 comments on commit 7c48252

Please sign in to comment.