PDO Wrapper

This PDO wrapper, is a collection of crud methods for working with a database this includes selecting, inserting, updating and deleting records.



Using composer include the repository by typing the following into a terminal

composer require daveismyname/pdo-wrapper

Set the db credentials. Finally create an instance of the classes by calling it's get method.

This wrapper makes use of a single database connection further connections attempts will reuse the already open connections, if not already connected.

use Daveismyname\PdoWrapper\Database;

// make a connection to mysql here
$db = Database::get($username, $password, $database, $host = 'localhost', $type = 'mysql');

Usage examples