Strange output from select in Active records - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Strange output from select in Active records (/showthread.php?tid=31295) |
Strange output from select in Active records - El Forum - 06-14-2010 [eluser]mlinuxgada[/eluser] Hi, I have strange behaviour using active records: Code: $this->db->distinct(); Code: SELECT DISTINCT date_format(date, `'%Y-%m')` as date_format FROM ... Strange output from select in Active records - El Forum - 06-14-2010 [eluser]WanWizard[/eluser] This is described in the manual. The AR functions by default tries to escape all fields. This doesn't work on SQL functions, so you have to disable automatic escaping. Strange output from select in Active records - El Forum - 06-14-2010 [eluser]mlinuxgada[/eluser] Thanks! |