From: Aaron Schulz Date: Wed, 11 Jul 2007 20:07:25 +0000 (+0000) Subject: *Make null values of arrays use NULL(for lists) or IS NULL, rather than x = NULL... X-Git-Tag: 1.31.0-rc.0~52129 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=d20bf39150020d314be1a5605a8fdcf4bf47a4cc;p=lhc%2Fweb%2Fwiklou.git *Make null values of arrays use NULL(for lists) or IS NULL, rather than x = NULL, which doesn't work --- diff --git a/includes/Database.php b/includes/Database.php index 160e14369e..4e6efa4cfe 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -1531,8 +1531,13 @@ class Database { $list .= "($value)"; } elseif ( ($mode == LIST_SET) && is_numeric( $field ) ) { $list .= "$value"; - } elseif ( ($mode == LIST_AND || $mode == LIST_OR) && is_array ($value) ) { + } elseif ( ($mode == LIST_AND || $mode == LIST_OR) && is_array($value) ) { $list .= $field." IN (".$this->makeList($value).") "; + } elseif( is_null($value) ) { + if ( $mode == LIST_AND || $mode == LIST_OR || $mode == LIST_SET ) { + $list .= "$field IS "; + } + $list .= 'NULL'; } else { if ( $mode == LIST_AND || $mode == LIST_OR || $mode == LIST_SET ) { $list .= "$field = ";