我需要在hading子句中添加一个带有count的字段。
这是我的查询
SELECT `bmp_bloggers`.*, `bmp_languages`.`languagename`, `bmp_blogs`.`blid` FROM `bmp_bloggers` JOIN `bmp_blogs` ON `bmp_blogs`.`bgid` = `bmp_bloggers`.`bgid` JOIN `bmp_languages` ON `bmp_languages`.`laid` = `bmp_bloggers`.`laid` WHERE `bloggerapproved` = '2' AND `bmp_blogs`.`blogstatus` = 1 GROUP BY `bmp_bloggers`.`bgid` HAVING COUNT(`bmp_bloggers`.`bgid`) >=2 ORDER BY `bloggeractive` ASC LIMIT 50
我需要将此查询集成到CI中。