PHP code example of webiik / database

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

    

webiik / database example snippets


$db = new \Webiik\Database\Database();
$db->add('main', 'mysql', 'localhost', 'webiik', 'root', 'root');
$pdo = $db->connect();

add(string $name, string $driver, string $host, string $databaseName, string $user, string $password, array $options = [], array $commands = []): void

$db->add('main', 'mysql', 'localhost', 'webiik', 'root', 'root');

connect(string $name = ''): \PDO

$pdo = $db->connect();

disconnect(string $name = ''): void

$db->disconnect();