PHP code example of adipriyantobpn / yii2-db-oracle

1. Go to this page and download the library: Download adipriyantobpn/yii2-db-oracle 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/ */

    

adipriyantobpn / yii2-db-oracle example snippets


'components' => [
    'db' => [
        'class' => 'adipriyantobpn\db\oracle\Connection',
        'host' => 'localhost',
        'port' => 1522 // default: 1521
        'sid' => 'XE'
        'dateFormat' => 'DD-MON-RR' // default: 'YYYY-MM-DD HH24:MI:SS'
    ],
]

$this->dsn = "oci:dbname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={$this->host})(PORT={$this->port})))(CONNECT_DATA=(SID={$this->sid})))"

'components' => [
    'db' => [
        'class' => 'adipriyantobpn\db\oracle\Connection',
        'dsn' => 'oci:dbname=//localhost:1521/XE',
        'dateFormat' => 'DD-MON-RR' // default: 'YYYY-MM-DD HH24:MI:SS'
    ],
]

php composer.phar