mirror of
https://codeberg.org/vlw/php-mysql.git
synced 2025-09-13 16:23:42 +02:00
fix: filter column value null in where method
This commit is contained in:
parent
c1c67d0267
commit
1b37a63c34
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue