public function _joinUsing($type,
$name,
$cond,
$cols = '*',
$schema = null
) { if (empty($this->_parts
[self::FROM
])) { throw new Zend_Db_Select_Exception('You can only perform a joinUsing after specifying a FROM table'
);
} $join =
$this->_adapter->
quoteIdentifier(key($this->_parts
[self::FROM
]), true
);
$from =
$this->_adapter->
quoteIdentifier($this->
_uniqueCorrelation($name), true
);
$joinCond =
[];
foreach ((array) $cond as $fieldName) { $cond1 =
$from . '.' .
$fieldName;
$cond2 =
$join . '.' .
$fieldName;
$joinCond[] =
$cond1 . ' = ' .
$cond2;
} $cond =
implode(' ' . self::SQL_AND . ' ',
$joinCond);
return $this->
_join($type,
$name,
$cond,
$cols,
$schema);
}