Skip to content

Commit

Permalink
Merge pull request #591 from bioleyl/fix/whereInChunkBug
Browse files Browse the repository at this point in the history
[FIX] WhereIn was adding 'or' every chunk of thousand after the first…
  • Loading branch information
yajra authored Sep 23, 2020
2 parents 000dba8 + 12f2773 commit 849149b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Oci8/Query/Grammars/OracleGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ private function resolveClause($column, $values, $type)
$i = 0;
$type = $this->wrap($column) . ' '.$type.' ';
foreach ($chunks as $ch) {
if ($i > 0) {
// Add or only at the second loop
if ($i === 1) {
$type = ' or ' . $type . ' ';
}
$whereClause .= $type . '('.implode(', ', $ch).')';
Expand Down

0 comments on commit 849149b

Please sign in to comment.