Skip to content

Commit 1f777ab

Browse files
committed
2 parents ca2c195 + 2eb655d commit 1f777ab

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Query/Grammars/DB2Grammar.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ protected function compileAnsiOffset(Builder $query, $components)
104104
}
105105

106106
$components['columns'] = $this->compileOver($orderings, $columns);
107+
108+
// if there are bindings in the order, we need to move them to the select since we are moving the parameter
109+
// markers there with the OVER statement
110+
if(isset($query->getRawBindings()['order'])){
111+
$query->addBinding($query->getRawBindings()['order'], 'select');
112+
$query->setBindings([], 'order');
113+
}
107114

108115
unset($components['orders']);
109116

0 commit comments

Comments
 (0)