2010-11-01 Miguel de Dios <miguel.dedios@artica.es>

* 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



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3487 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-11-01 16:38:44 +00:00
parent 411bf82dbc
commit 72318ac63e
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2010-11-01 Miguel de Dios <miguel.dedios@artica.es>
* 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 <miguel.dedios@artica.es>
* include/functions_html.php: cleaned source code style. And added line

View File

@ -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);
}