Use IN for search in numeric fields (Editor)
This commit is contained in:
parent
21192be01e
commit
3a11358dc7
|
@ -8,6 +8,7 @@ MS SQL: auto primary and foreign key
|
|||
SQLite: display 0
|
||||
Create table default data type: int
|
||||
Homepage customization
|
||||
Use IN for search in numeric fields (Editor)
|
||||
Work without session.use_cookies (bug #3138640)
|
||||
Portuguese translation
|
||||
|
||||
|
|
|
@ -302,7 +302,11 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
|||
} else {
|
||||
$text_type = ereg('char|text|enum|set', $field["type"]);
|
||||
$value = $this->processInput($field, ($text_type && ereg('^[^%]+$', $val) ? "%$val%" : $val));
|
||||
$conds[] = idf_escape($name) . ($value == "NULL" ? " IS" . ($op == ">=" ? " NOT" : "") : (in_array($op, $this->operators) ? " $op" : ($op != "=" && $text_type ? " LIKE" : " ="))) . " $value"; //! can issue "Illegal mix of collations" for columns in other character sets - solve by CONVERT($name using utf8)
|
||||
$conds[] = idf_escape($name) . ($value == "NULL" ? " IS" . ($op == ">=" ? " NOT" : "") . " $value"
|
||||
: (in_array($op, $this->operators) || $op == "=" ? " $op $value"
|
||||
: ($text_type ? " LIKE $value"
|
||||
: " IN (" . str_replace(",", "', '", $value) . ")"
|
||||
))); //! can issue "Illegal mix of collations" for columns in other character sets - solve by CONVERT($name using utf8)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue