Done with implementing PDO in media function.
Done with getting the current and the past events.