CodeIgniter Active Record select with 2 or more tables
问题 I have this sql statement setup in my old code and want to move it over to active record, the problem that I'm phased with is how do I do a SELECT news_items.id FROM (SELECT news_items.* FROM news_items JOIN feeds ON feeds.id=news_items.feed LEFT JOIN news_item_country ON news_item_country.id=news_items.country WHERE news_items.id=30758 ORDER BY date_item DESC ) AS news_items GROUP BY news_items.id ORDER BY date_item DESC Trying to do this with Active Record, first I created the select that