PHP code example of professionalweb / oci8pdo

1. Go to this page and download the library: Download professionalweb/oci8pdo 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/ */

    

professionalweb / oci8pdo example snippets


return [
    'components' => [
        'db' => [
            'class' => 'professionalweb\oci8Pdo\Connection',
            'dsn' => 'oci:dbname=DBNAME',
            'username' => 'LOGIN',
            'password' => 'PASSWORD',
            'enableQueryCache' => false,
            'enableSchemaCache' => true,
            'schemaCache' => 'cache',
            'schemaCacheDuration' => 0,
            'queryCacheDuration' => 3600,
            'on afterOpen' => function($event) {
                $event->sender->createCommand("alter session set nls_date_format='dd.mm.yyyy hh24:mi'")->execute();
            }
        ]
    ]
];