From: Platonides Date: Fri, 17 Jun 2011 14:54:41 +0000 (+0000) Subject: Empower our Database object so that it is possible to perform NOT NULL queries (SELEC... X-Git-Tag: 1.31.0-rc.0~29473 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=706cb9fa8904aa9ebbd45e6e02605777eb3d15ee;p=lhc%2Fweb%2Fwiklou.git Empower our Database object so that it is possible to perform NOT NULL queries (SELECT abc WHERE xyz IS NOT NULL) --- diff --git a/includes/db/Database.php b/includes/db/Database.php index b26970eb0d..89b6dca3a0 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1489,6 +1489,9 @@ abstract class DatabaseBase implements DatabaseType { } elseif ( $value === null ) { if ( $mode == LIST_AND || $mode == LIST_OR ) { $list .= "$field IS "; + if ( $not ) { + $list .= "NOT "; + } } elseif ( $mode == LIST_SET ) { $list .= "$field = "; }