Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
fixed where null issue
Browse files Browse the repository at this point in the history
  • Loading branch information
freezer278 authored and msonowal committed Mar 16, 2019
1 parent 4e598e2 commit 9212a50
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Engines/Modes/Mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ protected function buildWheres(Builder $builder)
$operator = $parsedWhere[1];
$value = $parsedWhere[2];

$this->whereParams[$field] = $value;

$queryString .= "$field $operator ? AND ";
if ($value !== null) {
$this->whereParams[$field] = $value;
$queryString .= "$field $operator ? AND ";
} else {
$queryString .= "$field IS NULL AND ";
}
}

return $queryString;
Expand Down

0 comments on commit 9212a50

Please sign in to comment.