Bluz\Db\Query\Traits\Where::orWhere PHP Method

orWhere() public method

. OR .. condition Adds one or more restrictions to the query results, forming a logical disjunction with any previously specified restrictions. $sb = new SelectBuilder(); $sb ->select('u.name') ->from('users', 'u') ->where('u.id = 1') ->orWhere('u.id = ?', 2);
public orWhere ( $condition )
$condition Optional the query restriction predicates
    public function orWhere(...$condition)
    {
        $condition = $this->prepareCondition($condition);
        $where = $this->getQueryPart('where');
        if ($where instanceof CompositeBuilder && $where->getType() == 'OR') {
            $where->add($condition);
        } else {
            $where = new CompositeBuilder([$where, $condition], 'OR');
        }
        return $this->addQueryPart('where', $where, false);
    }