Skip to content

Commit be32dcb

Browse files
committed
re-set query bindings
1 parent 050b288 commit be32dcb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/app/Library/CrudPanel/Traits/Query.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ private function getCountFromQuery(Builder $query)
257257
// - orders/limit/offset because we want the "full query count" where orders don't matter and limit/offset would break the total count
258258
$subQuery = $crudQuery->cloneWithout(['columns', 'orders', 'limit', 'offset']);
259259

260+
// re-set the previous query bindings
261+
$subQuery->setBindings($crudQuery->getRawBindings());
262+
260263
// select only one column for the count
261264
$subQuery->select($modelTable.'.'.$this->model->getKeyName());
262265

0 commit comments

Comments
 (0)