DbCriteria vs findBySql

What’s the difference between:

cat=new CDbCriteria();


                $cat->order="name ASC";



Categoria::model()->findBySQL("select * from categoria order by name ASC");

as far as i know basically not much

but cdbcriteria helps you to avoid writing sql

i stopped using findbysql since you can really do everything

without it (together, etc.) which is pretty neat. i dont know if there is a performance impact

maybe a more experienced user can elaborate more.

also i found a similar thread: