Index: trunk/phase3/includes/Database.php |
— | — | @@ -1531,8 +1531,13 @@ |
1532 | 1532 | $list .= "($value)"; |
1533 | 1533 | } elseif ( ($mode == LIST_SET) && is_numeric( $field ) ) { |
1534 | 1534 | $list .= "$value"; |
1535 | | - } elseif ( ($mode == LIST_AND || $mode == LIST_OR) && is_array ($value) ) { |
| 1535 | + } elseif ( ($mode == LIST_AND || $mode == LIST_OR) && is_array($value) ) { |
1536 | 1536 | $list .= $field." IN (".$this->makeList($value).") "; |
| 1537 | + } elseif( is_null($value) ) { |
| 1538 | + if ( $mode == LIST_AND || $mode == LIST_OR || $mode == LIST_SET ) { |
| 1539 | + $list .= "$field IS "; |
| 1540 | + } |
| 1541 | + $list .= 'NULL'; |
1537 | 1542 | } else { |
1538 | 1543 | if ( $mode == LIST_AND || $mode == LIST_OR || $mode == LIST_SET ) { |
1539 | 1544 | $list .= "$field = "; |