/** * Function for adding a new arena to the database. Updates the arena object. * * @param activitycalendar_arena $arena the party to be added * @return bool true if successful, false otherwise */ function add(&$arena) { // Insert a new arena $q = "INSERT INTO activity_arena (arena_name) VALUES ('test')"; $result = $this->db->query($q); if (isset($result)) { // Set the new party ID $arena->set_id($this->db->get_last_insert_id('activity_arena', 'id')); // Forward this request to the update method return $this->update($arena); } else { return false; } }