Answer the question
In order to leave comments, you need to log in
How to transfer a query to a Yii model?
Good afternoon,
I'm wondering how it is possible to execute the following query in Yii
SELECT * FROM users WHERE id IN (SELECT o.user_id FROM orders o WHERE MAX(o.DATE) <= :DATE GROUP BY o.user_id)
SELECT COUNT(mc_offers .bid_id)
FROM mc_offers
LEFT JOIN m_bids ON m_bids.id = mc_offers.bid_id
WHERE m_bids.customer_id = 'x';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question