Changeset 307 for trunk/team.php
- Timestamp:
- Jan 31, 2010, 1:50:45 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/team.php
r303 r307 82 82 83 83 // Delete all teams without users 84 $Database->SQLCommand('DELETE FROM `Team` WHERE (SELECT COUNT(*) FROM `user` WHERE `user`.`team` = `Team`.`Id`) = 0'); 84 $Database->SQLCommand('DELETE FROM `Team` WHERE (SELECT COUNT(*) FROM `user` WHERE `user`.`team` = `Team`.`Id`) = 0'); 85 86 // Set new leader for teams where old leader went to other team 87 $Database->SQLCommand('UPDATE Team SET Leader=(SELECT Id FROM `user` WHERE user.Team=Team.Id ORDER BY user.RegistrationTime LIMIT 1) WHERE Leader NOT IN (SELECT ID FROM user WHERE user.Team=Team.Id);'); 85 88 86 89 ShowTeamList();
Note:
See TracChangeset
for help on using the changeset viewer.