diff --git a/src/MySQL.php b/src/MySQL.php index b88f6c3..2776854 100644 --- a/src/MySQL.php +++ b/src/MySQL.php @@ -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