Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

Oracle Alias Case Sensitive

posted by darren 7 years ago

Hi,

When I alias a column name its not returned with the matching case and is placed in all lower case.

$a = $this->db->query('
    SELECT
        c.cust_name "Customer Name"
    FROM ord o
    JOIN cust c
        ON c.cust_ser_num = o.cust_ser_num
    WHERE o.ord_num = 123
');

If I query the DB using a client like Navicat the case is maintained.

Any help would be appreciated.

Thanks.

fDatabase (or possibly fResult) explicitly converts all column names in results to lowercase for Oracle since Oracle insists on returning them in all uppercase, even when the column names are specified in lowercase in the SQL query. This is necessary to allow for the ORM to function with different types of databases without writing lots of custom code to handle Oracle.

posted by wbond 7 years ago