PHP code example of monkeyslegion / monkeyslegiondb
1. Go to this page and download the library: Download monkeyslegion/monkeyslegiondb 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/ */
monkeyslegion / monkeyslegiondb example snippets
use Monkeyslegion\\MonkeyslegionDB\\ConnectionPool;
$connection = ConnectionPool::getConnection();
use Monkeyslegion\\MonkeyslegionDB\\QueryBuilder;
$query = (new QueryBuilder())
.select('*')
.from('users')
.where('id', '=', 1)
.build();
use Monkeyslegion\\MonkeyslegionDB\\Transaction;
$transaction = new Transaction($connection);
$transaction->begin();
// ... perform operations
$transaction->commit();
use Monkeyslegion\\MonkeyslegionDB\\Logger;
$dbLogger = new Logger($yourPsr3Logger);
$dbLogger->logQuery('SELECT * FROM users WHERE id = ?', [1]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.