diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 551209a711..90d88cbdff 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2010-11-01 Miguel de Dios + + * include/functions_db.php: in function "format_array_to_where_clause_sql" + added lines for test when is a string start with % for check with LIKE + operator. + + Fixes: #3098170 + 2010-11-01 Miguel de Dios * include/functions_html.php: cleaned source code style. And added line diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 38de335f5a..5756b92793 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -2672,7 +2672,10 @@ function format_array_to_where_clause_sql ($values, $join = 'AND', $prefix = fal $value = substr($value,1,strlen($value)-1); $query .= sprintf ("%s < '%s'", $field, $value); } - } + } + else if ($value[0] == '%') { + $query .= sprintf ("%s LIKE '%s'", $field, $value); + } else { $query .= sprintf ("%s = '%s'", $field, $value); }