嗨,有什么方法可以在 Yii 查询生成器中编写以下查询
SELECT t.email
FROM otz_user_header t
JOIN otz_customers r ON t.user_id = r.customer_user_id
JOIN otz_customer_ratings cr ON cr.customer_user_id = r.customer_user_id
WHERE r.rate_auto_approve =0
AND r.rate_email_time IS NOT NULL
AND r.total_rating_count IS NOT NULL
AND cr.rating_date < CURDATE( )
AND cr.rating_date >DATE_SUB( CURDATE( ) , INTERVAL 7
DAY )
我已经使用 Yii DAO 方法编写了上述查询,但我希望将此查询与查询生成器相匹配,这可能吗?