1. Go to this page and download the library: Download pharako/mysql-dbal 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/ */
pharako / mysql-dbal example snippets
use Doctrine\Common\EventManager;
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\Driver\PDOMySql\Driver;
use Pharako\DBAL\Connection;
$params = [
'dbname' => 'my_db',
'host' => 'localhost',
'user' => 'username',
'password' => '***',
'driver' => 'pdo_mysql'
];
$dbal = new Connection(
$params,
new Driver(),
new Configuration(),
new EventManager()
);