diff --git a/maarch_entreprise/trunk/class/class_types.php b/maarch_entreprise/trunk/class/class_types.php index 80043d498167f8fa5154cf00d4068f60efba5c8f..9ba1c4127a6d9c25e8de88a1504780230be5c300 100644 --- a/maarch_entreprise/trunk/class/class_types.php +++ b/maarch_entreprise/trunk/class/class_types.php @@ -1267,14 +1267,23 @@ class types extends database if (preg_match('/^doc_/', $fieldName)) { $column = 'doc_' . $column; } - // type == 'string' + // type == 'string or others' if ($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 . "' : ['" . addslashes(trim($val)) . "'],"; $whereRequest .= " lower(" . $column . ") like lower('%" . $this->protect_string_db($val) . "%') and "; + } break; } else if (($indexes[$j]['column'] . '_from' == $fieldName || $indexes[$j]['column'] . '_to' == $fieldName