dblayeroo: whereAdd "IS NULL" : do not add the value as it doesn't exists

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3816 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-07-19 10:28:24 +00:00
parent 3ad9d4be68
commit 88f394fb72

View File

@@ -1826,6 +1826,16 @@ class dblayeroo
$operator = "~";
if ($this->driver === "pgsql" && $operator === "NOT REGEXP")
$operator = "!~";
if ($operator === "IS NULL")
{
// Operator without parameter
$this->whereExpression[] =
$this->sep.$this->tableprefix.$this->table.$this->sep.".".
$this->sep.$field.$this->sep." ".$operator;
}
else
{
// Operator with parameter
$hash = md5 ("$field, $operator, $value");
$this->whereExpression[] =
$this->sep.$this->tableprefix.$this->table.$this->sep.".".
@@ -1837,6 +1847,7 @@ class dblayeroo
"value"=>$value,
"hash"=>$hash,
"type"=>$this->fieldTypeLight ($field));
}
return $this;
}
/* }}} */