Then I went into the yiic shell tool and tried to create a model. This is
what I get.
exception ‘CDbException’ with message ‘CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2030 This command is not supported in the prepared statement protocol yet’ in /path/to/yii/framework/db/CDbCommand.php:322
I don’t want to hear it only works with SQLITE!
This one SHOULD be trivial. Pls tell me how to fix.
Thank you that worked. I never heard of anything like that, it’s not in the Guide, and I have used mySQL for years and PDO for quite a while too. Since all I’m doing at the moment is running the Yii script, it would seem like this attribute would need to be set by anyone using mySQL, i.e. by default.
How should I have known that it was there in the first place and that I needed to turn it on?
I used prepared statements before, but maybe not in this environment. Doesn’t Magento use them? I have a magento install running out of this database server. It would be interesting to know why some installations need it and others don’t. Has it got something to do with the version of the driver you installed? Oh well, I should shut up. It works and that’s good.
On my local machine it works also without ‘emulatePrepare’ but on deployment server - not.
On model creation
I see this error: "CDbCommand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]  This command is not supported in the prepared statement protocol yet. The SQL statement executed was: SHOW CREATE TABLE student"