PHP code example of drips / database
1. Go to this page and download the library: Download drips/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/ */
drips / database example snippets
use Drips\Database\DB;
$db = DB::getConnection();
$result = $db->select('users', '*');
use Drips\Database\DB;
use Drips\Database\Connection;
$connection2 = new Connection([
// Datenbank-Verbindungsinformationen (siehe Medoo-Dokumentation)
]);
DB::setConnection('database2', $connection2);
$db1 = DB::getConnection();
$result = $db->select('users', '*');
$db2 = DB::getConnection('database2');
$result2 = $db2->select('news', '*');