Adds condition for or in where clause
@see where
@param $param
@return $this
559496
public function orWhere($param){
        if (func_num_args() == 3) {

            $operator =strtolower(func_get_arg(1));
            if (is_numeric(array_search($operator, $this->condition))) {
                $this->whereby .=' or '.self::sanitize(func_get_arg(0))
                    .' '. $operator . ' \''
                    . self::sanitize(func_get_arg(2)) . '\'';
            } else {
                static::$response["status"] = "error";
                static::$response["response"] = "Invalid condition provided in where function";
                static::$response["code"] = 7000;
            }
        } else if (func_num_args() == 2) {
            $this->whereby .= ' or '.self::sanitize(func_get_arg(0)) . ' = \''
                . self::sanitize(func_get_arg(1)) . '\'';
        } else {
            static::$response["status"] = "error";
            static::$response["response"] = "Invalid parameters provided in where function";
            static::$response["code"] = 7001;
        }

        return $this;
    }
962531
public function set($condition, array $params = [])
    {
        $this->conditions = [];
        $this->add($condition, $params);
        return $this;
    }
645601
public function where($column, $op = null, $value = null)
    {
        $this->parseWhereMethod($column, $op, $value, 'where');

        return $this;
    }
825324
public function orWhere($field, $condition = false, $operator = '=')
    {
        if (func_num_args() >= 2) {
            $this->where->addOrCondition($field, $condition, $operator);
        } else {
            $this->where->addOrCondition($field);
        }

        return $this;
    }
1079518
public function where($key, $constraint = null, $value = null, $condition = 'AND')
    {
        $handle = $this->getHandle();

        $this->_internal_query->where($key, $constraint, $value, $condition);

        if (!isset($this->_parent_query->where[$handle])) {
            $this->_parent_query->where[$handle] = array('clause' => $this, 'condition' => $this->_condition);
        }

        return $this;
    }
702696
public function where($key, $constraint = null, $value = null, $condition = 'AND')
    {
        if (in_array($constraint, array('AND', 'OR'))) {
            $condition = $constraint;
            $constraint = null;
        } elseif (is_array($key)) {
            if (!is_numeric(key($key))) {
                foreach ($key as $k => $v) {
                    $this->where($k, '=', $v, 'AND');
                }

                return $this;
            }
        }

        $where = array();
        $where['property'] = $key;

        if (isset($constraint)) {
            $constraint = strtoupper($constraint);
            $condition = strtoupper($condition);

            $list = $value instanceof AnObjectSet || is_array($value);

            //fix the contstraint
            if ($list || $value instanceof self) {
                if ($constraint == '=') {
                    $constraint = 'IN';
                } elseif ($constraint == '<>') {
                    $constraint = 'NOT IN';
                }
            }

            $where['constraint'] = $constraint;
            $where['value'] = $value;
        }

        $where['condition'] = !empty($this->where) ? $condition : '';

        $this->where[] = $where;

        return $this;
    }
817553
public function orWhere(string ...$condition) : self
    {
        $this->whereConditions = $this->addConditionToClause(
            $this->whereConditions, 'OR', ...$condition);

        return $this;
    }
1024001
public function where($where, &$params)
    {
        if (!is_array($where)) {
            throw new \Exception("Invalid where clause specified, must be an array");
        }

        $params = Helper::toArray($params);

        $query = "";

        $andFlag = false;

        foreach ($where as $field => $value) {

            # Add the and flag if this isn't the first field
            if ($andFlag) {
                $query .= "AND ";
            } else {
                $andFlag = true;
            }

            # Add the field name to the query
            $query .= $this->quoteField($field);

            # Convert arrays to use the in helper
            if (is_array($value)) {
                $helperMap = [
                    "<"     =>  "lessThan",
                    "<="    =>  "lessThanOrEqualTo",
                    ">"     =>  "greaterThan",
                    ">="    =>  "greaterThanOrEqualTo",
                    "="     =>  "equals",
                    "<>"    =>  "notEqualTo",
                ];
                $clause = (string) reset($value);
                if (count($value) === 2 && isset($helperMap[$clause])) {
                    $method = $helperMap[$clause];
                    $val = next($value);
                    trigger_error("Using arrays for complex where clauses is deprecated in favour of the helper methods, eg Sql::" . $method . "(" . $val . ")", E_USER_DEPRECATED);
                    $value = static::$method($val);
                } else {
                    $value = static::in($value);
                }
            }

            # Any parameters not using a helper should use the standard equals helper
            if (!is_object($value)) {
                $value = static::equals($value);
            }

            $query .= " " . $value->getClause() . " ";
            foreach ($value->getValues() as $val) {
                $params[] = $val;
            }
        }

        return $query;
    }
1101046
public function orWhere($void = null)
    {
        $this->ensureNoArguments(__METHOD__, $void);

        return $this->addChild(new WhereOr($this));
    }
983771
public function param($param, $value) {
		if ($value !== null) {
			$param = rawurlencode($param);
			$value = rawurlencode($value);
			$this->params[$param] = $value;
		} else {
			if (isset($this->params[$param])) {
				unset($this->params[$param]);
			}
		}
		return $this;
	}
509335
public function having($condition, $parameter = [])
	{
		$this->emptyResult();
		$this->queryBuilder->addHaving($condition, $parameter);
		return $this;
	}
1111776
protected function getCondition($param, $i)
    {
        $key = null;
        $cond = "=";
        $value = null;
        $and = "AND";

        if (is_array($param)) {

            $count = count($param);

            if ($count > 1) {
                $key = $param[0];
                $value = $param[1];
            }

            if ($count > 2) {
                $key = $param[0];
                $cond = $param[1];
                $value = $param[2];
            }

            if ($count > 3) {
                $key = $param[0];
                $cond = $param[1];
                $value = $param[2];
                $and = $param[3];
            }
        }

        if (is_null($value) && $cond == "=") {
            return [
                "ISNULL(" . $key . ")",
                null,
                null,
                " " . trim($and) . " "
            ];
        }

        if ($cond == 'IN') {
            //$value = "(" . $value . ")";
        } else {
            //$value = $this->db->quote($value);
        }

        $suffix = '_' . $i;

        $this->addParameter($key . $suffix, $value);

        return [
            str_replace('``', '', "`" . $key . "`"),
            " " . trim($cond) . " ",
            //is_null($value) ? "NULL" : $value,
            ":" . $key . $suffix,
            " " . trim($and) . " "
        ];
    }
1356885
public function where($conditions, $params = array())
    {
        $this->mergeParams($params);
        $this->query['where'] = $this->buildConditions($conditions);

        return $this;
    }
870538
public function where(string $sql, array $params = []) : self
    {
        $this->qiterator = null;
        $this->where[] = [ $sql, $params ];
        return $this;
    }
1023685
public function setParam($param, array $binds = [])
    {
        $this->param = preg_replace_callback('/\{\w+\}/', function () use (&$binds) {
            return array_shift($binds);
        }, trim($param, '/'));

        return $this;
    }
401319
public function where($field, $op = null, $condition = null)
    {
        $param = func_get_args();
        array_shift($param);
        $this->parseWhereExp('and', $field, $op, $condition, $param);
        return $this;
    }
648425
public function orWhere($field, $operator = null, $value = null)
    {
        $this->query->orWhere($field, $operator, $value);

        return $this;
    }