mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 22:09:48 +08:00
fix error
fix error when if fields whose names are reserved word
This commit is contained in:
@@ -219,6 +219,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
|
||||
->from('sys.columns')
|
||||
->where("object_id = OBJECT_ID('dbo.{$table}')")
|
||||
->column();
|
||||
array_walk($columns, create_function('&$str', '$str = "[$str]";'));
|
||||
return $columns;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user