diff --git a/select.inc.php b/select.inc.php
index 2cb3fba4..d3de582b 100644
--- a/select.inc.php
+++ b/select.inc.php
@@ -39,11 +39,17 @@ if (!$columns) {
echo "
\n";
}
}
- $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "REGEXP", "IS NULL");
+ $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "REGEXP", "IN", "IS NULL");
$i = 0;
foreach ((array) $_GET["where"] as $val) {
if (strlen($val["col"]) && in_array($val["op"], $operators)) {
- $where[] = idf_escape($val["col"]) . " $val[op]" . ($val["op"] != "IS NULL" ? " '" . $mysql->escape_string($val["val"]) . "'" : "");
+ if ($val["op"] == "IN") {
+ $in = process_length($val["val"]);
+ if (!strlen($in)) {
+ $in = "NULL";
+ }
+ }
+ $where[] = idf_escape($val["col"]) . " $val[op]" . ($val["op"] == "IS NULL" ? "" : ($val["op"] == "IN" ? " ($in)" : " '" . $mysql->escape_string($val["val"]) . "'"));
echo "