输入banner图图片脚本导航/分类

ci框架里的ar模型如何使用mysql函数?

group by left(ctime,10) 用ci写就是
$this->db->group_by('left(ctime,10)');

但是最后执行的sql语句是GROUP BY left(o.ctime, 10) 因为引号的位置会报错

有解决方案吗?

回复内容:

group by left(ctime,10) 用ci写就是
$this->db->group_by('left(ctime,10)');

但是最后执行的sql语句是GROUP BY left(o.ctime, 10) 因为引号的位置会报错

有解决方案吗?