public function rightJoin($table, callable $callable)
    {
        $table = $this->getPrefix().$table;

        if (is_null($this->join)) {
            $this->join = 'right join `'.$table.'`';

            if (is_callable($callable)) {
                $callable($this);
            }

            return $this;
        }

        if (!preg_match('/^(inner|left)\sjoin\s.*/', $this->join)) {
            $this->join .= ', `'.$table.'`';

            if (is_callable($callable)) {
                $callable($this);
            }

            return $this;
        }

        throw new QueryBuilderException(
            'The inner join clause is already initialized.',
            E_ERROR
        );
    }
public function rightJoin($table, callable $callable)
    {
        $table = $this->getPrefix().$table;

        if (is_null($this->join)) {
            $this->join = 'right join `'.$table.'`';

            if (is_callable($callable)) {
                $callable($this);
            }

            return $this;
        }

        if (!preg_match('/^(inner|left)\sjoin\s.*/', $this->join)) {
            $this->join .= ', `'.$table.'`';

            if (is_callable($callable)) {
                $callable($this);
            }

            return $this;
        }

        throw new QueryBuilderException(
            'The inner join clause is already initialized.',
            E_ERROR
        );
    }
public function rightJoin ( $ table , callable $ callable ) { $ table = $ this -> getPrefix ( ) . $ table ; if ( is_null ( $ this -> join ) ) { $ this -> join = 'right join `' . $ table . '`' ; if ( is_callable ( $ callable ) ) { $ callable ( $ this ) ; } return $ this ; } if ( ! preg_match ( '/^(inner|left)\sjoin\s.*/' , $ this -> join ) ) { $ this -> join .= ', `' . $ table . '`' ; if ( is_callable ( $ callable ) ) { $ callable ( $ this ) ; } return $ this ; } throw new QueryBuilderException ( 'The inner join clause is already initialized.' , E_ERROR ) ; }
Right Join clause

@param string $table
@param callable $callable

@throws QueryBuilderException
@return QueryBuilder
Right Join clause