dblayeroo: add < and > comparisons

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3832 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-07-25 13:50:41 +00:00
parent 3509b8b1f3
commit 8e24549ddd

View File

@@ -1898,8 +1898,9 @@ class dblayeroo
$this->DBException (sprintf ( $this->DBException (sprintf (
"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 ("=", "<", "<=", ">", ">=", "!=",
"IS NOT NULL", "REGEXP", "NOT REGEXP"); "LIKE", "NOT LIKE", "IS NULL", "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