PDO database result implementation