title: Not getting right alias name with Cakephp
body: <p>I am new on CakePHP and facing a problem with SQL Alias. 
  I want to make an Excel file to generate a report from the MySQL database. </p>
  
  <pre><code>/**
       * Generate transaction report
       *
       * @param none
       *
       * @return void
       */
      public function generateReport()
      {
  
           //Getting data from the database to generate the report in Excel file
          $data = $this-&gt;AchTransaction-&gt;find('all', array(
              //'conditions' =&gt; $searchCondition,
              'fields' =&gt; array(
                      "payee_name AS PAYEENAME",
                      'reference AS REFERENCE',
                      'reference2 AS REFERENCE2',
                      'currency AS CURRENCY',
                      'amount AS PAYOUTAMOUNT',
                      'bank_name AS BANKNAME',
                      'bank_branch_name AS BANKBRANCHNAME',
                      'bank_address AS BANKADDRESS',
                      'bank_country AS BANKCOUNTRY',
                      'account_name AS ACCOUNTNAME',
                      'account_class AS  ACCOUNTCLASS',
                      'account_type AS ACCOUNTTYPE',
                      'bank_routing_number AS BANKROUTING',
                      'account_number AS ACCOUNT',
                      'beneficiary_address AS BENEFICIARYADDRESS',
                      'beneficiary_city AS BENEFICIARYCITY',
                      'beneficiary_state AS BENEFICIARYSTATE',
                      'beneficiary_postcode AS BENEFICIARYZIPCODE',
                      'beneficiary_country AS BENEFICIARYCOUNTRY',
                      'note as NOTE'
                      ),
              'order' =&gt; array('AchTransaction.id DESC')
                  ));
  
  
  
          // Generating Excel file
          $this-&gt;Common-&gt;generateReport($data);
      }
  </code></pre>
  
  <p>I am able to generate the Excel but having only one problem in alias, As you can see </p>
  
  <pre><code>"payee_name AS PAYEENAME",
  </code></pre>
  
  <p>Here the <code>payee_name</code> is the name of column or field in MySQL table, and I want this as <code>PAYEE NAME</code>, but when I write:</p>
  
  <pre><code>"payee_name AS PAYEE NAME", 
  </code></pre>
  
  <p>I am getting this MySQL error:</p>
  
  <pre><code>Database Error
  
  Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payee_name AS PAYEE NAME' in 'field list'
  
  SQL Query: SELECT `payee_name AS PAYEE NAME`, `reference` AS `REFERENCE`, `reference2` AS `REFERENCE2`, `currency` AS `CURRENCY`, `amount` AS `PAYOUTAMOUNT`, `bank_name` AS `BANKNAME`, `bank_branch_name` AS `BANKBRANCHNAME`, `bank_address` AS `BANKADDRESS`, `bank_country` AS `BANKCOUNTRY`, `account_name` AS `ACCOUNTNAME`, `account_class` AS `ACCOUNTCLASS`, `account_type` AS `ACCOUNTTYPE`, `bank_routing_number` AS `BANKROUTING`, `account_number` AS `ACCOUNT`, `beneficiary_address` AS `BENEFICIARYADDRESS`, `beneficiary_city` AS `BENEFICIARYCITY`, `beneficiary_state` AS `BENEFICIARYSTATE`, `beneficiary_postcode` AS `BENEFICIARYZIPCODE`, `beneficiary_country` AS `BENEFICIARYCOUNTRY`, `note` AS `NOTE` FROM `aramor_payments`.`ach_transactions` AS `AchTransaction` WHERE 1 = 1 ORDER BY `AchTransaction`.`id` DESC
  
  Notice: If you want to customize this error message, create app\View\Errors\pdo_error.ctp
  Stack Trace
  
      CORE\Cake\Model\Datasource\DboSource.php line 461 → PDOStatement-&gt;execute(array)
      CORE\Cake\Model\Datasource\DboSource.php line 427 → DboSource-&gt;_execute(string, array)
      CORE\Cake\Model\Datasource\DboSource.php line 671 → DboSource-&gt;execute(string, array, array)
      CORE\Cake\Model\Datasource\DboSource.php line 1082 → DboSource-&gt;fetchAll(string, boolean)
      CORE\Cake\Model\Model.php line 2631 → DboSource-&gt;read(AchTransaction, array)
      APP\Controller\AchtransactionsController.php line 353 → Model-&gt;find(string, array)
      [internal function] → AchtransactionsController-&gt;generateReport()
      CORE\Cake\Controller\Controller.php line 485 → ReflectionMethod-&gt;invokeArgs(AchtransactionsController, array)
      CORE\Cake\Routing\Dispatcher.php line 186 → Controller-&gt;invokeAction(CakeRequest)
      CORE\Cake\Routing\Dispatcher.php line 161 → Dispatcher-&gt;_invoke(AchtransactionsController, CakeRequest, CakeResponse)
      APP\webroot\index.php line 92 → Dispatcher-&gt;dispatch(CakeRequest, CakeResponse)
  </code></pre>
  
  <p>Can you please help me to get the name of <code>payee_name</code> field as <code>PAYEE NAME</code>?</p>