Move the function remove_team from list_users.php to Team.class
Revoke certificates after drop all teams
This commit is contained in:
parent
964d3b067f
commit
31eabf84b4
4 changed files with 43 additions and 18 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Reference in a new issue