port blog to PDO