make us of db_affected_rows($result) instead of using db specific functions