|
|
@ -2039,7 +2039,13 @@ function db_where_clause($condition, $struct, $additional_raw_where = '', $searc
|
|
|
|
} elseif ($operator == "NOTNULL") {
|
|
|
|
} elseif ($operator == "NOTNULL") {
|
|
|
|
$querypart = $field . ' IS NOT NULL';
|
|
|
|
$querypart = $field . ' IS NOT NULL';
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
$querypart = $field . $operator . "'" . escape_string($value) . "'";
|
|
|
|
$querypart = $field . $operator . "'" . escape_string($value) . "'";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// might need other types adding here.
|
|
|
|
|
|
|
|
if (db_pgsql() && in_array($struct[$field]['type'], array('ts', 'num')) && $value === '') {
|
|
|
|
|
|
|
|
$querypart = $field . $operator . " NULL";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!empty($struct[$field]['select'])) {
|
|
|
|
if (!empty($struct[$field]['select'])) {
|
|
|
|