If you need to use literal strings in your select clause (such as a date format) using the CodeIgniter DB helper, you will need to pass false as the second parameter

$this->db->select(
    'DATE_FORMAT(date, "%Y-%m-%d") as something_date', 
    false
);
  • By: Andrew Kirkpatrick
  • In: PHP
  • Under: