Random event and user ids
Updated sql