PHP code example of reclamestal / pdo-db-wrapper

1. Go to this page and download the library: Download reclamestal/pdo-db-wrapper 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/ */

    

reclamestal / pdo-db-wrapper example snippets


define('DB_HOST', 'localhost');
define('DB_PORT', '3306');
define('DB_USER', 'username');
define('DB_PASS', 'password');
define('DB_NAME', 'database_name');

//Autoloader van Composer
rmat = "html");
} catch (Exception $e) {
    print_r($e);
}

$rows   = $db->select('table_name');
$row    = $db->selectSingle('table_name');
$insert = $db->update('table_name',['column'=>'value']);
$update = $db->update('table_name',['column'=>'newvalue']);
$delete = $db->delete('table_name','column = :value',[':value'=>'value']);
$run    = $db->run('SELECT * FROM ...',[':value'=>'value']);