diff --git a/code/web/Drivers/Koha.php b/code/web/Drivers/Koha.php index b1db2f1570..6886add4ec 100644 --- a/code/web/Drivers/Koha.php +++ b/code/web/Drivers/Koha.php @@ -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();