Php database class with pdo connection