public quoteSimpleTableName ( string $name ) : string | ||
$name | string | table name |
리턴 | string | the properly quoted table name |
public function quoteSimpleTableName($name)
{
return strpos($name, "'") !== false ? $name : "'" . $name . "'";
}
/** * @param string $alias * @param string|array $columns * @param \yii\db\Schema $schema * @return string */ protected function quoteColumn($alias, $columns, $schema) { $t = $schema->quoteSimpleTableName($alias); if (!is_array($columns)) { return $t . '.' . $schema->quoteSimpleColumnName($columns); } $result = array(); foreach ($columns as $column) { $result[] = $t . '.' . $schema->quoteSimpleColumnName($column); } return implode(',', $result); }