mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fix incorrect querystring when comparing column against null value
This commit is contained in:
parent
22182c4c19
commit
a6f771c155
2 changed files with 3 additions and 3 deletions
|
|
@ -105,12 +105,12 @@ class VariableBase
|
|||
switch ($this->operation)
|
||||
{
|
||||
case 'equal':
|
||||
$where = sprintf('%s = %s', $column, $is_expression ? $value : '?');
|
||||
$where = sprintf('%s %s %s', $column, ($is_expression && $value === 'NULL') ? 'IS' : '=', $is_expression ? $value : '?');
|
||||
if (!$is_expression) $params[] = $value;
|
||||
break;
|
||||
case 'notequal':
|
||||
case 'not_equal':
|
||||
$where = sprintf('%s != %s', $column, $is_expression ? $value : '?');
|
||||
$where = sprintf('%s %s %s', $column, ($is_expression && $value === 'NULL') ? 'IS NOT' : '!=', $is_expression ? $value : '?');
|
||||
if (!$is_expression) $params[] = $value;
|
||||
break;
|
||||
case 'more':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue