Home > Article > Backend Development > How to use the mysql function in the ar model in the ci framework?
group by left(ctime,10) written in ci is
$this->db->group_by('left(ctime,10)');
But the last executed sql statement is GROUP BY left(o.ctime, 10)
Because the position of the quotation marks will cause an error
Is there a solution?
group by left(ctime,10) written in ci is
$this->db->group_by('left(ctime,10)');
But the last executed sql statement is GROUP BY left(o.ctime, 10)
Because the position of the quotation marks will cause an error
Is there a solution?