title: Datatables server side processing and column alias
body: <p>In Datatables using server side processing, is it possible to use column alias when specifying the columns?</p>
  
  <p>At the moment this works fine with:</p>
  
  <pre><code>$aColumns = array( 'datetime','username', 'user_ip', 'company', 'action' );
  </code></pre>
  
  <p>but I would like to change the format of the date using date format in MySQL so, in effect, I want to use:</p>
  
  <pre><code>$aColumns = array( 'DATE_FORMAT(datetime, "%d/%m/%Y - %H:%i:%s") as newdate';'username'; 'user_ip';'company'; 'action' );
  </code></pre>
  
  <p>The problem is that the alias has a comma and the aColumns array is comma seperated so it breaks when later, for example, it comes to:</p>
  
  <pre><code>$sQuery = "
      SELECT SQL_CALC_FOUND_ROWS ".str_replace(" , ", " ", implode(", ", $aColumns))."
      FROM   $sTable
      $sWhere
      $sOrder
      $sLimit
  ";
  </code></pre>
  
  <p>Is there a way I can use the alias rather than the original value? Even simply changing the select statement does not work as aColumns is used throughout the script hence it needs that value to be set correctly</p>
  
  <p>Thanks</p>