]> git.joonet.de Git - adminer.git/commitdiff
Allow IS NOT NULL by using >=
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sat, 3 Oct 2009 21:19:30 +0000 (21:19 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sat, 3 Oct 2009 21:19:30 +0000 (21:19 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1166 7c3ca157-0c34-0410-bff1-cbf682f78f5c

editor/include/adminer.inc.php

index 250d914f5d0eb7e7df11c72e48ce1a06aa2c8eb1..577b0b9c7833db7f6c315f45c091bae1a2367668 100644 (file)
@@ -249,7 +249,7 @@ ORDER BY ORDINAL_POSITION");
                                        if (strlen($col) || is_numeric($val["val"]) || !ereg('int|float|double|decimal', $field["type"])) {
                                                $text_type = ereg('char|text|enum|set', $field["type"]);
                                                $value = $this->processInput($field, ($text_type && ereg('^[^%]+$', $val["val"]) ? "%$val[val]%" : $val["val"]));
-                                               $conds[] = idf_escape($name) . (in_array($val["op"], $this->operators) ? " $val[op]" : ($value == "NULL" ? " IS" : ($val["op"] != "=" && $text_type ? " LIKE" : " ="))) . " $value";
+                                               $conds[] = idf_escape($name) . ($value == "NULL" ? " IS" . ($val["op"] == ">=" ? " NOT" : "") : (in_array($val["op"], $this->operators) ? " $val[op]" : ($val["op"] != "=" && $text_type ? " LIKE" : " ="))) . " $value";
                                        }
                                }
                                $return[] = ($conds ? "(" . implode(" OR ", $conds) . ")" : "0");