From 706cb9fa8904aa9ebbd45e6e02605777eb3d15ee Mon Sep 17 00:00:00 2001 From: Platonides Date: Fri, 17 Jun 2011 14:54:41 +0000 Subject: [PATCH] Empower our Database object so that it is possible to perform NOT NULL queries (SELECT abc WHERE xyz IS NOT NULL) --- includes/db/Database.php | 3 +++ 1 file changed, 3 insertions(+) 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 = "; } -- 2.20.1