mirror of
https://codeberg.org/vlw/php-mysql.git
synced 2025-09-14 08:43:40 +02:00
fix: filter column value null in where method (#26)
This commit is contained in:
parent
c1c67d0267
commit
3f97e7b1f0
1 changed files with 6 additions and 0 deletions
|
@ -91,6 +91,12 @@
|
||||||
continue;
|
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
|
// Create SQL for prepared statement
|
||||||
$filter[] = "`{$col}` = ?";
|
$filter[] = "`{$col}` = ?";
|
||||||
// Append value to array with all other values
|
// Append value to array with all other values
|
||||||
|
|
Loading…
Add table
Reference in a new issue