Chained PDO database wrapper