1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-15 11:04:02 +02:00

Allow IS NOT NULL by using >=

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1166 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-10-03 21:19:30 +00:00
parent b7ac2c06e4
commit 7741dfb13d

View 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");