dblayeroo: Add IS NOT NULL operator to whereAdd
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3823 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -1892,7 +1892,7 @@ class dblayeroo
|
|||||||
"Invalid field to whereAdd '%s' : not defined in table", $field));
|
"Invalid field to whereAdd '%s' : not defined in table", $field));
|
||||||
$operator = strtoupper ($operator);
|
$operator = strtoupper ($operator);
|
||||||
$allowed = array ("=", "<=", ">=", "!=", "LIKE", "NOT LIKE", "IS NULL",
|
$allowed = array ("=", "<=", ">=", "!=", "LIKE", "NOT LIKE", "IS NULL",
|
||||||
"REGEXP", "NOT REGEXP");
|
"IS NOT NULL", "REGEXP", "NOT REGEXP");
|
||||||
if (! in_array ($operator, $allowed))
|
if (! in_array ($operator, $allowed))
|
||||||
$this->DBException ("Invalid operator provided (unknown operator)");
|
$this->DBException ("Invalid operator provided (unknown operator)");
|
||||||
// TODO : Check if the value is corresponding to the type of the column
|
// TODO : Check if the value is corresponding to the type of the column
|
||||||
@@ -1905,7 +1905,7 @@ class dblayeroo
|
|||||||
$operator = "~";
|
$operator = "~";
|
||||||
if ($this->driver === "pgsql" && $operator === "NOT REGEXP")
|
if ($this->driver === "pgsql" && $operator === "NOT REGEXP")
|
||||||
$operator = "!~";
|
$operator = "!~";
|
||||||
if ($operator === "IS NULL")
|
if ($operator === "IS NULL" || $operator === "IS NOT NULL")
|
||||||
{
|
{
|
||||||
// Operator without parameter
|
// Operator without parameter
|
||||||
$this->whereExpression[] =
|
$this->whereExpression[] =
|
||||||
|
|||||||
Reference in New Issue
Block a user