Criteria to string


I’m new to Yii, been working with it for about a month now, very impressed and enjoying using it. One feature that doesnt seem to be available but which I think would be usefull is some sort of a toString() function on a CDbCriteria object - which would give you a standard SQL string that you could then debug, maybe this is already available in some form and I’ve missed something?

Any help/suggestions appreciated.

Welcome to the forum,

If you wish to debug your SQL statements, you could do as suggested on this wiki:

If you are using CDbCommand you can also access the getText()