/** * Delete all history related to this round */ function clearHistory() { global $database; $params = array('round_id' => $this->id); $jHistory = new jHistory($database); $jHistories = forceArray($jHistory->loadByParams($params)); foreach ($jHistories as $jHistory) { $jHistory->destroy(); } }