Improved the function "oracle_db_format_array_where_clause_sql" by adding more checks
This commit is contained in:
parent
b02d381205
commit
5751666f45
|
@ -654,16 +654,28 @@ function oracle_db_format_array_where_clause_sql ($values, $join = 'AND', $prefi
|
||||||
else {
|
else {
|
||||||
if ($value[0] == ">") {
|
if ($value[0] == ">") {
|
||||||
$value = substr($value,1,strlen($value)-1);
|
$value = substr($value,1,strlen($value)-1);
|
||||||
$query .= sprintf ("%s > '%s'", $field, $value);
|
|
||||||
|
if (is_nan($value))
|
||||||
|
$query .= sprintf ("%s > '%s'", $field, $value);
|
||||||
|
else
|
||||||
|
$query .= sprintf ("%s > %s", $field, $value);
|
||||||
}
|
}
|
||||||
else if ($value[0] == "<") {
|
else if ($value[0] == "<") {
|
||||||
if ($value[1] == ">") {
|
if ($value[1] == ">") {
|
||||||
$value = substr($value,2,strlen($value)-2);
|
$value = substr($value,2,strlen($value)-2);
|
||||||
$query .= sprintf ("%s <> '%s'", $field, $value);
|
|
||||||
|
if (is_nan($value))
|
||||||
|
$query .= sprintf ("%s <> '%s'", $field, $value);
|
||||||
|
else
|
||||||
|
$query .= sprintf ("%s <> %s", $field, $value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$value = substr($value,1,strlen($value)-1);
|
$value = substr($value,1,strlen($value)-1);
|
||||||
$query .= sprintf ("%s < '%s'", $field, $value);
|
|
||||||
|
if (is_nan($value))
|
||||||
|
$query .= sprintf ("%s < '%s'", $field, $value);
|
||||||
|
else
|
||||||
|
$query .= sprintf ("%s < %s", $field, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($value[0] == '%') {
|
else if ($value[0] == '%') {
|
||||||
|
|
Loading…
Reference in New Issue