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; }