method getJoin documentation in bbn\Db\Languages\Sql
Returns a string with the JOIN part of the query if there is, empty otherwise
function(array $cfg)
{
$res = '';
if (!empty($cfg['join'])) {
foreach ($cfg['join'] as $join) {
if (isset($join['table'], $join['on']) && ($cond = $this->getConditions($join['on'], $cfg, false, 4))) {
$res .= ' ' .
(isset($join['type']) && (strtolower($join['type']) === 'left') ? 'LEFT ' : '') .
'JOIN ' . $this->tableFullName($join['table'], true) .
(!empty($join['alias']) ? ' AS ' . $this->escape($join['alias']) : '')
. PHP_EOL . ' ON ' . $cond;
}
}
}
return $res;
}
Returns a string with the JOIN part of the query if there is, empty otherwise BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions