PHP code example of edgardmessias / yii2-ibm-db2

1. Go to this page and download the library: Download edgardmessias/yii2-ibm-db2 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

edgardmessias / yii2-ibm-db2 example snippets


return [
    //....
    'components' => [
        'db' => [
            'class'         => 'edgardmessias\db\ibm\db2\Connection',
            'dsn'           => 'ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=test;HOSTNAME=127.0.0.1;PORT=50000;PROTOCOL=TCPIP',
            'username'      => 'username',
            'password'      => 'password',
            'defaultSchema' => '',
            'isISeries'     => false
        ],
    ],
];

return [
    //....
    'components' => [
        'db' => [
            'class'         => 'edgardmessias\db\ibm\db2\Connection',
            'dsn'           => 'odbc:DRIVER={IBM i Access ODBC Driver 64-bit};SYSTEM=127.0.0.1;PROTOCOL=TCPIP',
            'username'      => 'username',
            'password'      => 'password',
            'defaultSchema' => '',
            'isISeries'     => false
        ],
    ],
];
bash
php composer.phar