From 0ac0fa75a54bda8c08afbfc978f62a9018fd654a Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 19 Jul 2017 10:30:44 +0000 Subject: [PATCH] dblayeroo: whereAddParenthesisOpen: Add automatically AND before if there is no already defined operator git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3817 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- dblayeroo.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dblayeroo.php b/dblayeroo.php index bdb6219..2985d24 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -1884,6 +1884,11 @@ class dblayeroo /* {{{ */ { $this->debugLog ("Entering whereAddParenthesisOpen ()"); + if (count ($this->whereExpression) && + end ($this->whereExpression) !== "AND" && + end ($this->whereExpression) !== "OR" && + end ($this->whereExpression) !== "(") + $this->whereExpression[] = "AND"; $this->whereExpression[] = "("; return $this; }