ineersa ineersa - 26 days ago 10
MySQL Question

CDbCriteria and mysql USE INDEX()

I got problem with activerecord in yii. So the basic problem is howto define

USE INDEX()
mySQL criteria as CDbCriteria to pass it to CActivedataprovider.
I didnt find it in api or in code. Maybe someone already had this problem before and can share his solution.

Thank you.

Answer

I found the solution. https://github.com/yiisoft/yii/issues/1385 this hack helps with simple selects and indexes.