public static function from($context, $tables, $as = null)
{
if ($tables instanceof BasicRule) {
$context->appendSql("FROM (" . $tables->context->sql . ')');
$context->params = array_merge($context->params, $tables->context->params);
} else {
$context->appendSql("FROM {$tables}");
}
if ($as) {
$context->appendSql("as {$as}");
}
}
/** * from('table') => "FROM table" * @param string $table * @return \phprs\ezsql\rules\select\JoinRule */ public function from($table, $as = null) { FromImpl::from($this->context, $table, $as); return new JoinRule($this->context); }