CodeIgniter Forums
DB->SELECT error - 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: DB->SELECT error (/showthread.php?tid=19775)



DB->SELECT error - El Forum - 06-18-2009

[eluser]LAMP Coder[/eluser]
Code:
$this->db->select("FROM_UNIXTIME(entered_on,'%M/%D/%Y') AS invoiceDate");

Above code ends up in an error because CI converts the query to following:

Code:
SELECT FROM_UNIXTIME(entered_on, `'%M/%D/%Y')` AS invoiceDate FROM (`invoices`) WHERE...


how do i get around this?


DB->SELECT error - El Forum - 06-18-2009

[eluser]n0xie[/eluser]
Code:
$this->db->select("FROM_UNIXTIME(entered_on,'%M/%D/%Y') AS invoiceDate", FALSE);



DB->SELECT error - El Forum - 06-18-2009

[eluser]LAMP Coder[/eluser]
thank you Smile