PHP code example of rioxygen / cicoredatabase

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

    

rioxygen / cicoredatabase example snippets



use Rioxygen\CiCoreDatabase\Mysql\CI_DB_mysqli_driver;
$db = array(
    'dsn'	=> '',
    'hostname' => 'cicore-db',
    'username' => 'root',
    'password' => 'mysql',
    'database' => 'magento2',
    'dbdriver' => 'mysqli',
    'dbprefix' => '',
    'pconnect' => TRUE,
    'db_debug' => 'production',
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);

$test = new CI_DB_mysqli_driver($db);
$query =  $test->query("SELECT * FROM tester");