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:
parent
f1d034fa02
commit
377838a814
|
@ -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>
|
||||
|
||||
* operation/agentes/networkmap.php: Fixed the groups
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue