原文报错:ERROR: cannot insert multiple commands into a prepared statement
是这样的,我想在创建表的同时给字段加上注释
$sql = "create table xxx {
test_id character varying(80)
};
comment on column xxx.test_id is '测试id'";
$ret = Yii::$app->db->createCommand($sql)->execute();
这样的话就会报这样的错误
因为有很多字段,不可能没加一个注释就单独执行一条命令,
请问该怎么解决,我用的框架是yii
'测试id'"; 是不是你id 后面 分号问题啦。 yii可以使用postgresql的以前用过