Skip to content
Snippets Groups Projects
Commit 7eeef93e authored by SNA's avatar SNA
Browse files

FIX #3043 selected list on index type

parent 614bc934
No related branches found
No related tags found
No related merge requests found
...@@ -1267,14 +1267,23 @@ class types extends database ...@@ -1267,14 +1267,23 @@ class types extends database
if (preg_match('/^doc_/', $fieldName)) { if (preg_match('/^doc_/', $fieldName)) {
$column = 'doc_' . $column; $column = 'doc_' . $column;
} }
// type == 'string' // type == 'string or others'
if ($indexes[$j]['column'] == $fieldName if ($indexes[$j]['column'] == $fieldName
|| 'doc_' . $indexes[$j]['column'] == $fieldName || 'doc_' . $indexes[$j]['column'] == $fieldName
) { ) {
if ( $indexes[$j]['type'] = float || $indexes[$j]['type'] = integer )
{
$jsonTxt .= " '" . $fieldName . "' : ['"
. addslashes(trim($val)) . "'],";
$whereRequest .= " (" . $column . ") = ('"
. $val . "') and ";
} else {
$jsonTxt .= " '" . $fieldName . "' : ['" $jsonTxt .= " '" . $fieldName . "' : ['"
. addslashes(trim($val)) . "'],"; . addslashes(trim($val)) . "'],";
$whereRequest .= " lower(" . $column . ") like lower('%" $whereRequest .= " lower(" . $column . ") like lower('%"
. $this->protect_string_db($val) . "%') and "; . $this->protect_string_db($val) . "%') and ";
}
break; break;
} else if (($indexes[$j]['column'] . '_from' == $fieldName } else if (($indexes[$j]['column'] . '_from' == $fieldName
|| $indexes[$j]['column'] . '_to' == $fieldName || $indexes[$j]['column'] . '_to' == $fieldName
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment