lower case table names and columns in ZF2

General discussion on Zend Server for IBM System i

lower case table names and columns in ZF2

Postby rodn8274 on Wed Dec 14, 2016 9:30 pm

Does anyone know the proper configuation options to set in ZF2 to force table names and columns to lower case. I'm using pdo_odbc. Creating a db connection using the odbc driver works perfectly
Code: Select all
$Conn = new PDO("odbc:DEV", $username, $password, [ PDO::ATTR_CASE => PDO::CASE_LOWER ]);

**NOTE: DEV is my datasource name configured in my odbc.ini file on the server

I'm using ZF2 and utilizing Zend\Db\Adapter to create my connection instance. You are supposed to set up the config parameters in a local.php file like this:
Code: Select all
$db_config = array(
        'driver' => 'pdo_odbc',
        'dsn' => 'odbc:DEV',
        'driver_options' => array(
            'i5_naming' => 'DB2_I5_NAMING_ON',
            'autocommit' => 'DB_AUTOCOMMIT_OFF',
            'i5_lib' => $configs['i5_lib'],
        'platform_options' => array(
            'quote_identifiers' => false,
            'isDefaultTableAdapter' => true
        'username' => 'XXXXX',
        'password' => 'XXXXXX'     

I'm struggling with how to set the PDO::ATTR_CASE => PDO::CASE_LOWER parameters in the config array. I've tried multiple scenarios but nothing seems to work. Any help would greatly be appreciated
Posts: 11
Joined: Mon Dec 29, 2014 5:22 pm

Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 2 guests