As addressed in Guide:
execute(): performs a non-query SQL statement, such as INSERT, UPDATE and DELETE. If successful, it returns the number of rows that are affected by the execution.
query(): performs an SQL statement that returns rows of data, such as SELECT. If successful, it returns a CDbDataReader instance from which one can traverse the resulting rows of data. For convenience, a set of queryXXX() methods are also implemented which directly return the query results.
This means I have to know query type( select or insert/update/delete) for every query in advance, however it gives me problems to wrap some 3rd party lib/app into yii extensions, since some of them are using sth like mysql_query() which works for all types of queries.
Does Yii DAO have sth equivalent? if not, I think we should add a universal query method for DAO.