PHP code example of jpuck / qdbp

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

    

jpuck / qdbp example snippets



return call_user_func(function(){
    $hostname = 'localhost';
    $database = 'example_D4JAOb';
    $username = 'example_D4JAOb_A';
    $password = '8is+G?Gkg.BNW_}9B5kmjPyr02G~Z2lO';

    $pdo = new PDO("mysql:host=$hostname;
        charset=UTF8;
        dbname=$database",
        $username,
        $password
    );
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    return $pdo;
});



$pdo = CT * FROM Users';

$array = $pdo->query($sql)->fetchAll();