Ported from mysqli to PDO. Library still assumes mysqli driver.