Yii Framework : Help to translate relational Sql query
问题 I encountered a problem to write this query in a Yii model oriented style. I have a 3 main tables : questions, categories, countries and relational tables : questions_has_categories, questions_has_countries. Now i try to search questions that belongs to country, category. With normal SQL statement i write : SELECT q.id, q.question, c.name, co.name FROM questions AS q, categories AS c, countries AS co, questions_has_countries AS ta, questions_has_categories AS qhc WHERE q.id = qhc.questions_id