private function delete_team() { if ($this->canDelete()) { $query = 'DELETE FROM ' . TEAMS . ' WHERE teamID=' . $this->get_teamID(); mysql_query($query) or die("sp_clubs (Line " . __LINE__ . "): " . mysql_errno() . ": " . mysql_error()); if (validResult()) { $this->teamFormSuccess[] = 'Team ' . $this->get_teamName() . ' deleted successfully!'; } else { $this->teamFormErrors[] = 'Team ' . $this->get_teamName() . ' NOT deleted! Try again or notify TCSHL.com administrator.'; } } else { $this->teamFormErrors[] = 'Team ' . $this->get_teamName() . ' CANNOT be deleted as it belongs to a season!'; } }
private function delete_season() { if ($this->canDelete()) { $query = 'DELETE FROM ' . SEASONS . ' WHERE seasonId=' . $this->get_seasonID(); mysql_query($query) or die("sp_clubs (Line " . __LINE__ . "): " . mysql_errno() . ": " . mysql_error()); if (validResult()) { $this->formSuccess[] = 'SEASON ' . $this->get_seasonName() . ' deleted successfully!'; } else { $this->formErrors[] = 'SEASON ' . $this->get_seasonName() . ' NOT deleted! Try again or notify TCSHL.com administrator.'; } } else { $this->formErrors[] = 'SEASON ' . $this->get_seasonName() . ' CANNOT be deleted as it has at least one game scheduled!'; } }
private function delete_boardMember() { $query = 'DELETE FROM ' . BOARDMEMBER . ' WHERE boardMemberID=' . $this->get_boardMemberID(); mysql_query($query) or die("sp_clubs (Line " . __LINE__ . "): " . mysql_errno() . ": " . mysql_error()); if (validResult()) { $this->boardMemberFormSuccess[] = 'Board Member ' . $this->get_boardMemberFirstName() . ' ' . $this->get_boardMemberLastName() . ' deleted successfully!'; } else { $this->boardMemberFormErrors[] = 'Board Member ' . $this->get_boardMemberFirstName() . ' ' . $this->get_boardMemberLastName() . ' NOT deleted! Try again or notify TCSHL.com administrator.'; } }
function delete_game() { $query = 'DELETE FROM ' . GAME . ' WHERE gameID=' . $this->get_gameID(); mysql_query($query) or die("sp_clubs (Line " . __LINE__ . "): " . mysql_errno() . ": " . mysql_error()); if (validResult()) { $this->formSuccess[] = 'Game deleted successfully!'; } else { $this->formErrors[] = 'Game NOT deleted! Try again or notify TCSHL.com administrator.'; } }
function delete_registration() { $query = 'DELETE FROM ' . REGISTRATION . ' WHERE registrationId=' . $this->get_registrationID(); mysql_query($query) or die("sp_clubs (Line " . __LINE__ . "): " . mysql_errno() . ": " . mysql_error()); if (validResult()) { $this->formSuccess[] = 'Registration for ' . $this->get_fName() . ' ' . $this->get_lName() . ' deleted successfully!'; } else { $this->formErrors[] = 'Registration for ' . $this->get_fName() . ' ' . $this->get_lName() . ' NOT deleted! Try again or notify TCSHL.com administrator.'; } }