Convert database statements to PDO.