2010-08-31 Sergio Martin <sergio.martin@artica.es>

* include/functions_db.php: Added support to '<>'
	comparation in the format_array_to_where_clause_sql
	function



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3204 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-08-31 10:48:11 +00:00
parent f1d034fa02
commit 377838a814
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2010-08-31 Sergio Martin <sergio.martin@artica.es>
* include/functions_db.php: Added support to '<>'
comparation in the format_array_to_where_clause_sql
function
2010-08-31 Sergio Martin <sergio.martin@artica.es> 2010-08-31 Sergio Martin <sergio.martin@artica.es>
* operation/agentes/networkmap.php: Fixed the groups * operation/agentes/networkmap.php: Fixed the groups

View File

@ -2619,9 +2619,15 @@ function format_array_to_where_clause_sql ($values, $join = 'AND', $prefix = fal
$query .= sprintf ("%s > '%s'", $field, $value); $query .= sprintf ("%s > '%s'", $field, $value);
} }
else if ($value[0] == "<"){ else if ($value[0] == "<"){
if ($value[1] == ">"){
$value = substr($value,2,strlen($value)-2);
$query .= sprintf ("%s <> '%s'", $field, $value);
}
else {
$value = substr($value,1,strlen($value)-1); $value = substr($value,1,strlen($value)-1);
$query .= sprintf ("%s < '%s'", $field, $value); $query .= sprintf ("%s < '%s'", $field, $value);
} }
}
else { else {
$query .= sprintf ("%s = '%s'", $field, $value); $query .= sprintf ("%s = '%s'", $field, $value);
} }