PDO rewrite of DB layer