PHP code example of andriusgecius / redundant-db

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

    

andriusgecius / redundant-db example snippets


// Require compser autoloader file
 => [
        'host' => 'HOSTNAME',
        'port' => 3306,
        'database' => 'DBNAME',
        'username' => 'USERNAME',
        'password' => 'PASSWORD',
        'type' => 'mysql'
    ],
    2 => [
        'host' => 'HOSTNAME',
        'port' => 3306,
        'database' => 'DBNAME',
        'username' => 'USERNAME',
        'password' => 'PASSWORD',
        'type' => 'mysql'
    ],
    'memc' => [
        'host' => 'localhost',
        'port' => 11211
    ],
    'charset' => 'utf8'
];

$RedundantDB = new \RedundantDB\Connection($dbConfig);
$connect = $RedundantDB->connect(); //Returns PDO