MysqliDb::_buildJoin PHP Method

_buildJoin() protected method

Abstraction method that will build an JOIN part of the query
protected _buildJoin ( )
    protected function _buildJoin()
    {
        if (empty($this->_join)) {
            return;
        }
        foreach ($this->_join as $data) {
            list($joinType, $joinTable, $joinCondition) = $data;
            if (is_object($joinTable)) {
                $joinStr = $this->_buildPair("", $joinTable);
            } else {
                $joinStr = $joinTable;
            }
            $this->_query .= " " . $joinType . " JOIN " . $joinStr . " on " . $joinCondition;
            // Add join and query
            if (!empty($this->_joinAnd) && isset($this->_joinAnd[$joinStr])) {
                foreach ($this->_joinAnd[$joinStr] as $join_and_cond) {
                    list($concat, $varName, $operator, $val) = $join_and_cond;
                    $this->_query .= " " . $concat . " " . $varName;
                    $this->conditionToSql($operator, $val);
                }
            }
        }
    }