update invitedcodes query