fix: filter column value null in where method (#26)

This commit is contained in:
Victor Westerlund 2023-12-31 17:33:59 +01:00 committed by GitHub
parent c1c67d0267
commit 3f97e7b1f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,6 +91,12 @@
continue;
}
// Value is null so it does not need to be added to the prepared statement
if (is_null($value)) {
$filter[] = "`{$col}` IS NULL";
continue;
}
// Create SQL for prepared statement
$filter[] = "`{$col}` = ?";
// Append value to array with all other values