move to PDO to support more databases.