Completed SQL functions for events

Created add_event function and get_events function.