1. Go to this page and download the library: Download scottchiefbaker/dbquery 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/ */
scottchiefbaker / dbquery example snippets
// SQLite
$dsn = "sqlite://path/to/dir/database.sqlite";
$dbq = new DBQuery($dsn);
// MySQL
$dsn = 'mysql:host=server.domain.com;dbname=my_database';
$user = 'john_smith';
$pass = 'sekrit';
$dbq = new DBQuery($dsn, $user, $pass);
$sql = "SELECT First, Last, City, State, Zipcode FROM Customers;";
$data = $dbq->query($sql);
foreach ($data as $rec) {
// Output code here
}