Flourish PHP Unframework

Oracle Alias Case Sensitive

posted by darren 1 year 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.

Reply

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 1 year ago Reply
In reply to post by wbond from 1 year ago
In reply to original post by darren