diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 17535a90ea..2e5774828c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-08-31 Sergio Martin + + * include/functions_db.php: Added support to '<>' + comparation in the format_array_to_where_clause_sql + function + 2010-08-31 Sergio Martin * operation/agentes/networkmap.php: Fixed the groups diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index e8ba2d44ce..91d4d3bf14 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -2562,7 +2562,7 @@ function format_array_to_where_clause_sql ($values, $join = 'AND', $prefix = fal $offset = sprintf (' OFFSET %d', $values['offset']); unset ($values['offset']); } - + if (isset ($values['order'])) { if (is_array($values['order'])) { if (!isset($values['order']['order'])) { @@ -2619,8 +2619,14 @@ function format_array_to_where_clause_sql ($values, $join = 'AND', $prefix = fal $query .= sprintf ("%s > '%s'", $field, $value); } else if ($value[0] == "<"){ - $value = substr($value,1,strlen($value)-1); - $query .= sprintf ("%s < '%s'", $field, $value); + if ($value[1] == ">"){ + $value = substr($value,2,strlen($value)-2); + $query .= sprintf ("%s <> '%s'", $field, $value); + } + else { + $value = substr($value,1,strlen($value)-1); + $query .= sprintf ("%s < '%s'", $field, $value); + } } else { $query .= sprintf ("%s = '%s'", $field, $value);