searching and sorting


I added some criteria to search() metod

$criteria->join = ‘join wojewodztwo t1 on (t.wojewodztwo_id = and like :word)’;


column name appears in both models,

now i cant sort by name of first model because it sorting by name no by

2010/06/29 16:51:33 [error] [system.db.CDbCommand] Error in querying SQL: SELECT * FROM serwis t join wojewodztwo t1 on (t.wojewodztwo_id = and l

ike :word) ORDER BY name LIMIT 10

CGridView has:






            ), ...

how to tell model to sort by


Check your row data, if it’s scrambled then you are having the same issue i am. It seems that Yii doesn’t handle joins that well yet.