Db-pdo is a project mainly written in PHP, it's free.
Singleton PDO class for PHP
h2. Usage
Include @libs/DbPDO.class.php@ and define the following constants.
<?php
include('libs/DbPDO.class.php');
define('DBHOST','localhost');
define('DBNAME','database');
define('DBUSER','username');
define('DBPASS','password');
Instantiate the class by calling the connect method.
<?php
$db = DbPDO::connect();
Run your queries.
<?php
$rows = $db->fetchAll('select * from table');