Getting event data from database