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:
@@ -1826,17 +1826,28 @@ class dblayeroo
|
||||
$operator = "~";
|
||||
if ($this->driver === "pgsql" && $operator === "NOT REGEXP")
|
||||
$operator = "!~";
|
||||
$hash = md5 ("$field, $operator, $value");
|
||||
$this->whereExpression[] =
|
||||
$this->sep.$this->tableprefix.$this->table.$this->sep.".".
|
||||
$this->sep.$field.$this->sep." ".$operator." :$hash";
|
||||
$this->whereValues[$hash] = array (
|
||||
"field"=>$field,
|
||||
"fieldfull"=> $this->tableprefix.$this->table.".".$field,
|
||||
"operator"=>$operator,
|
||||
"value"=>$value,
|
||||
"hash"=>$hash,
|
||||
"type"=>$this->fieldTypeLight ($field));
|
||||
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.".".
|
||||
$this->sep.$field.$this->sep." ".$operator." :$hash";
|
||||
$this->whereValues[$hash] = array (
|
||||
"field"=>$field,
|
||||
"fieldfull"=> $this->tableprefix.$this->table.".".$field,
|
||||
"operator"=>$operator,
|
||||
"value"=>$value,
|
||||
"hash"=>$hash,
|
||||
"type"=>$this->fieldTypeLight ($field));
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
Reference in New Issue
Block a user