title: How to properly use Alias in Codeigniter
body: <p>Here is my code:</p>
  
  <pre><code>$this-&gt;db-&gt;select('course_name AS Course Name,course_desc AS Course Description,display_public AS Display Status',FALSE);
  $this-&gt;db-&gt;from('courses');
  $this-&gt;db-&gt;where('tennant_id',$tennant_id);
  $this-&gt;db-&gt;order_by('course_name','ASC');
  $query = $this-&gt;db-&gt;get();
  </code></pre>
  
  <p>and I got an error:</p>
  
  <pre><code>A Database Error Occurred
  
  Error Number: 1064
  
  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Name, course_desc AS Course Description, display_public AS Display Status FROM (' at line 1
  </code></pre>
  
  <p>and I got an error:</p>
  
  <pre><code>A Database Error Occurred
  
  Error Number: 1064
  
  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Name, course_desc AS Course Description, display_public AS Display Status FROM (' at line 1
  
  SELECT course_name AS Course Name, 
         course_desc AS Course Description, 
         display_public AS Display Status 
  FROM (`courses`) WHERE `tennant_id` = 'elicuarto@apploma.com' 
  ORDER    BY `course_name` ASC
  
  Filename: C:\wamp\www\coursebooking\system\database\DB_driver.php
  
  Line Number: 330
  </code></pre>