From 68c46b44ec59676f071b10acaa2ae37a27b82c6a Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Mon, 22 Jun 2009 00:15:00 +0000 Subject: [PATCH] Translate empty IN to NULL git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@744 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/select.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 0ae1d436..8b99915c 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -41,10 +41,9 @@ foreach ((array) $_GET["where"] as $val) { if (strlen("$val[col]$val[val]") && in_array($val["op"], $operators)) { if ($val["op"] == "AGAINST") { $where[] = "MATCH (" . idf_escape($val["col"]) . ") AGAINST ('" . $dbh->escape_string($val["val"]) . "' IN BOOLEAN MODE)"; - } elseif (ereg('IN$', $val["op"]) && !strlen($in = process_length($val["val"]))) { - $where[] = "0"; } else { - $cond = " $val[op]" . (ereg('NULL$', $val["op"]) ? "" : (ereg('IN$', $val["op"]) ? " ($in)" : " '" . $dbh->escape_string($val["val"]) . "'")); //! this searches in numeric values too + $in = process_length($val["val"]); + $cond = " $val[op]" . (ereg('NULL$', $val["op"]) ? "" : (ereg('IN$', $val["op"]) ? " (" . (strlen($in) ? $in : "NULL") . ")" : " '" . $dbh->escape_string($val["val"]) . "'")); //! this searches in numeric values too if (strlen($val["col"])) { $where[] = idf_escape($val["col"]) . $cond; } else {