title: Getting syntax error when using mysql DATE_FORMAT
body: <p>I am using mysql <code>DATE_FORMAT</code> for a specific datetime in database. Mysql Query is:</p>
  
  <pre><code>$this-&gt;db-&gt;select('remarks_date, DATE('remarks_date') AS rem_dateonly, DATE_FORMAT('remarks_date', '%y-%m-%d %h:%i') AS day_hour_mins, DATE_FORMAT('remarks_date', '%y-%m-%d %h') AS day_hour, tbl_complain_detail.complain_summary, tbl_complain_detail.id, tbl_complain_detail.complain_no, tbl_complain_detail.created_by, escalation_status, tbl_admin_user.first_name, tbl_admin_user.middle_name, tbl_admin_user.last_name');
  $this-&gt;db-&gt;where('tbl_complain_remarks.status', 'Time Extension');
  $this-&gt;db-&gt;where('tbl_complain_detail.status !=', 'Completed');
  $this-&gt;db-&gt;where('tbl_complain_detail.time_extension_status', '1');
  $this-&gt;db-&gt;join('tbl_complain_remarks', 'tbl_complain_remarks.complain_id = tbl_complain_detail.id');
  $this-&gt;db-&gt;join('tbl_admin_user', 'tbl_admin_user.id = tbl_complain_detail.user_id');
  $result2 = $this-&gt;db-&gt;get('tbl_complain_detail')-&gt;result();
  </code></pre>
  
  <p>Here I am getting error as </p>
  
  <p><code>PHP Parse error:  syntax error, unexpected T_STRING in select line</code> </p>
  
  <p>and also it's not taking <code>%</code>. Why?</p>
  
  <p>Am I doing something wrong? Any help/suggestions will be appreciated.</p>