[eluser]startbbs[/eluser]
hi, guys, I have a SQL as below:
Code:
SELECT * from
( SELECT `a`.`tid`, `a`.`title`, `a`.`cid`, `a`.`updatetime`, `b`.`uid`, `b`.`username`
FROM (`news` a) LEFT JOIN `users` b ON `b`.`uid` = `a`.`uid`
WHERE `cid` IN ('10', '9', '8', '6', '4', '11', '7', '5')
ORDER BY a.cid, `a`.`updatetime` DESC ) alias
GROUP BY a.cid
I want to express it by Active records class, anyone can convert it using the Active Record Class?
thanks!