I tried to use
$this->db->select("orders.*, DATE_FORMAT(orders.created, '%M %e, %Y - %l:%i %p') AS OrderDate, users.id AS UserID, users.username AS UserName");
but this was generating error... but when i used False as 2nd parameter like this
$this->db->select("orders.*, DATE_FORMAT(orders.created, '%M %e, %Y - %l:%i %p') AS OrderDate, users.id AS UserID, users.username AS UserName", FALSE);
the error was gone....
Why is it necessary to use FALSE as 2nd parameter in DATE_FORMAT function in model in CodeIgniter?
Obviously, because it can't parse functions (with more than one parameter) and/or subqueries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With