addTable

@param string        $alias
@param string|Query  $table
@param mixed         $condition
@param string        $joinType
@param boolean       $prefix

@return  QueryHelper
322761
public function addTable($alias, $table, $condition = null, $joinType = 'LEFT', $prefix = null)
    {
        $tableStorage = [];

        $tableStorage['name'] = $table;
        $tableStorage['join'] = strtoupper($joinType);

        $condition = trim((string) new QueryElement('', (array) $condition, ' AND '));

        if (!$condition) {
            $tableStorage['join'] = 'FROM';
        }

        // Remove too many spaces
        $condition = preg_replace('/\s(?=\s)/', '', $condition);

        $tableStorage['condition'] = $condition;
        $tableStorage['prefix'] = $prefix;

        $this->tables[$alias] = $tableStorage;

        return $this;
    }
15730
protected function addUseRelatedQuery(&$script, $fkTable, $queryClass, $relationName, $joinType)
    {
        $script .= "
    /**
     * Use the $relationName relation " . $fkTable->getPhpName() . " object
     *
     * @see       useQuery()
     *
     * @param     string \$relationAlias optional alias for the relation,
     *                                   to be used as main alias in the secondary query
     * @param     string \$joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return   $queryClass A secondary query class using the current class as primary query
     */
    public function use" . $relationName . "Query(\$relationAlias = null, \$joinType = " . $joinType . ")
    {
        return \$this
            ->join" . $relationName . "(\$relationAlias, \$joinType)
            ->useQuery(\$relationAlias ? \$relationAlias : '$relationName', '$queryClass');
    }
";
    }
1204297
public function addJoin($join_field, $alias, $type = Join::INNER_JOIN, $cond = '')
    {
        if ($cond != '')
        {
            $cond = " with {$cond} ";
        }
        $join_method   = $type == Join::INNER_JOIN ? "innerJoin" : "leftJoin";
        $this->queryBuilder->$join_method($join_field, $alias, null, $cond);
        $this->joins[] = array($join_field, $alias, $type, $cond);
        return $this;
    }
930555
public function join($trueTableName, $alias, $on) {
        $join = new Join($trueTableName, $alias, $on);

        $this->statementContext->getJoinClause()->addJoin($join);
        return $this;
    }
226115
public function join($type, $table, $condition)
    {
        settype($condition, 'array');

        //The table needle
        $needle = $this->_adapter->getTableNeedle();

        if (strpos($table, $needle) !== 0) {
            $table = $needle.$table;
        }

        $this->join[] = array(
            'type'      => strtoupper($type),
            'table'     => $table,
            'condition' => $condition,
        );

        return $this;
    }
931468
public function addJoin($join_field, $alias, $type = Join::INNER_JOIN, $cond = '')
    {
        $this->_queryBuilder->addJoin($join_field, $alias, $type, $cond);
        return $this;
    }
1311085
public function createTable($table, $alias = null)
    {
        $tableObject = $this->facade->createTable($this, $table);

        if ($alias) {
            $tableObject->setAlias($alias);
        }

        return $tableObject;
    }
42745
public function innerJoin($table, $alias_or_cond, $cond = null) {
		if (is_null($cond))
			$this->joins[] = new JoinClause(JoinClause::INNER_JOIN, $table, null, $alias_or_cond);
		else
			$this->joins[] = new JoinClause(JoinClause::INNER_JOIN, $table, $alias_or_cond, $cond);
		return $this;
	}
966469
private function setManyToManyJoin($table, $alias, $condition = null)
    {
        if (!in_array($alias, $this->tables)) {
            if ($condition) {
                $this->queryBuilder->join($table, $alias, 'WITH', $condition);
            } else {
                $this->queryBuilder->join($table, $alias);
            }
            $this->tables[] = $alias;
        }
    }
892950
public function leftJoin($trueTableName, $alias, $on) {
        $join = new Join($trueTableName, $alias, $on);
        $join->setType(Join::LEFT_JOIN);

        $this->statementContext->getJoinClause()->addJoin($join);
        return $this;
    }
1082964
protected function anyJoin($type, $table, $conditions = '', $params = array())
    {
        $this->mergeParams($params);
        if ($alias = $this->matchAlias($table)) {
            $table = $this->db->quoteTable($alias[0]) . ' AS ' . $this->db->quoteTable($alias[1]);
        } else {
            $table = $this->db->quoteTable($table);
        }
        $conditions = $this->buildConditions($conditions);
        if ('' !== $conditions) {
            $conditions = ' ON ' . $conditions;
        }

        if (isset($this->query['join']) && is_string($this->query['join'])) {
            $this->query['join'] = array($this->query['join']);
        }

        $this->query['join'][] = $type . ' ' . $table . ' ' . $conditions;

        return $this;
    }
1120335
public function from($table, string $alias = null): self
    {
        return $this->table($table, $alias);
    }
1191299
public function From(string $table, string $alias = ''): QueryBuilder
    {
        $this->table = $table;
        
        if (! empty($alias)) {
            $this->alias = $alias;
        }
        
        return $this;
    }
458457
public function join($table, $joinType=MYSQL_JOIN_LEFT) {
        $this->sqlBuilder->join($table, $joinType);
        return $this;
    }
167080
public function leftJoin($fromAlias, $join, $alias, $condition = null)
    {
        $this->_dbPending[] = [
            'name' => 'leftJoin',
            'args' => [
                $fromAlias,
                $join,
                $alias,
                $condition
            ],
        ];

        return $this;
    }
1155101
public void add(SchemaTableTree stt, String column, String alias) {
        add(stt.getSchemaTable(), column, stt.getStepDepth(), alias);
    }
941746
public function addTable( $table, $prefix = NULL )
	{
		$prefix	= $prefix === NULL ? $this->prefix : $prefix;
		if( is_array( $table ) )
			return $this->addTables( $table, $prefix );
		if( in_array( $prefix.$table, $this->tables ) )
			return FALSE;
		$this->tables[] = $prefix.$table;
		return TRUE;
	}