I have copied unmodified (I think) code for Yii's database connection from manual / demo app / whatever. And, if I'm not mistaken, it has 'emulatePrepare'=>TRUE
set by default.
Then I found this and this answer and many more sources, which all seems to be claiming, that using emulate prepares is wrong idea. That it is some kind of relic from an old versions of RDBMS (particularly MySQL in my case) and should not be used on modern versions of MySQL/PHP.
Can someone confirm that? Should we have 'emulatePrepare'=>FALSE
in our Yii apps?
Both answers you have linked to are quite pointless and subjective. They fail to provide a certain reason for avoiding emulation mode. No wonder though, as there is not a single one.
There are only two real live cases known to me which really affects experience with PDO
execute()
for the LIMIT statement.So, the final decision is up yo you, but I wouldn't call any issue too critical.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With