Move the function remove_team from list_users.php to Team.class

Revoke certificates after drop all teams
This commit is contained in:
Li Chen 2013-12-01 19:40:47 +01:00
commit 31eabf84b4
4 changed files with 43 additions and 18 deletions

View file

@ -246,6 +246,15 @@ class Team
return ($aff == 1);
}
public static function remove_team($id)
{
$db = new BDD();
$db->query("DELETE FROM team_members WHERE id_team = ".$id);
$db->query("DELETE FROM solved WHERE id_team = ".$id);
$db->query("DELETE FROM teams WHERE id = ".$id);
$db->deconnexion();
}
public static function get_teams()
{
$db = new BDD();