2010-04-14 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_db.php: fixed bug in the function "get_db_value_filter"
	when the field's name is a reserve word of mysql crash.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2563 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-04-14 15:14:30 +00:00
parent 46303bbe57
commit f36696ebab
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-04-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: fixed bug in the function "get_db_value_filter"
when the field's name is a reserve word of mysql crash.
2010-04-14 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora_modules.js: Typo fix for bug 2953348

View File

@ -1671,7 +1671,7 @@ function get_db_value_filter ($field, $table, $filter, $where_join = 'AND') {
unset ($filter['limit']);
unset ($filter['offset']);
$sql = sprintf ("SELECT %s FROM %s WHERE %s LIMIT 1",
$sql = sprintf ("SELECT `%s` FROM %s WHERE %s LIMIT 1",
$field, $table,
format_array_to_where_clause_sql ($filter, $where_join));
$result = get_db_all_rows_sql ($sql);