Rewritten PDO integration