$config = require_once __DIR__ . '/config.php';
// config.php
return [
'database' => [
'driver' => 'memory',
]
];
// config.php
return [
'database' => [
'driver' => 'sqlite',
'dbname' => 'db.db',
'username' => '',
'password' => '',
]
];
// config.php
return [
'database' => [
'driver' => 'mysql',
'dbhost' => 'localhost',
'dbname' => _DATABASENAME_,
'username' => _DBUSERNAME_,
'password' => _DBPASSWORD_,
'charset' => 'utf8',
]
];
require_once __DIR__ . '/vendor/autoload.php';
use co0lc0der\QueryBuilder\Connection;
use co0lc0der\QueryBuilder\QueryBuilder;
$query = new QueryBuilder(Connection::make($config['database'])); // $printErrors = false
// for printing errors (since 0.3.6)
$query = new QueryBuilder(Connection::make($config['database']), true)
To the Methods section