Skip to content

Commit 3efdac7

Browse files
committed
Fixing error introduced by last patch where bindings were lost
Like mentioned in issue bgultekin#53 the new count function loses bindings causing a sql error. this patch fixes that.
1 parent c5e24e4 commit 3efdac7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Bllim/Datatables/Datatables.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,8 @@ public function database_prefix() {
476476
private function count()
477477
{
478478
//Count the number of rows in the select
479-
$this->count_all = DB::table(DB::raw('('.$this->query->toSql().') AS count_row_table'))->count();
479+
$this->count_all = DB::table(DB::raw('('.$this->query->toSql().') AS count_row_table'))
480+
->setBindings($this->query->getBindings())->count();
480481
}
481482

482483

0 commit comments

Comments
 (0)