Yii: using active record with autocommit off on mysql server
问题 Just wrote a Yii app and on the development mysql server the autocommit was set to true. Now when the app went into production I just realized that the mysql server autocommit is set to false. The app is using active record to save (which auto commits). Is there a variable that I can set in the config db file instead of having to add a beginTransaction and commit in each write to the db? 回答1: CDbConnection has an autoCommit property. I haven't tested it yet though. EDIT because of PHP MySQL