mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 13:58:24 +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')
|
->from('sys.columns')
|
||||||
->where("object_id = OBJECT_ID('dbo.{$table}')")
|
->where("object_id = OBJECT_ID('dbo.{$table}')")
|
||||||
->column();
|
->column();
|
||||||
|
array_walk($columns, create_function('&$str', '$str = "[$str]";'));
|
||||||
return $columns;
|
return $columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user