Changeset 350 for trunk/team.php
- Timestamp:
- Mar 3, 2010, 12:50:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/team.php
r349 r350 194 194 { 195 195 ImgLevelUpdate(); 196 $Columns = '';197 $Joins = '';198 foreach($TranslationTree as $Group)199 if($Group['TablePrefix'] != '')200 {201 $Columns .= 'COALESCE(T'.$Group['Id'].'.Count, 0) + ';202 $Joins .= ' LEFT JOIN (SELECT User, COUNT(User) as Count FROM `'.$Group['TablePrefix'].'` WHERE (Complete = 1) AND (Language <> 0) GROUP BY User) as T'.$Group['Id'].' ON user.ID=T'.$Group['Id'].'.User';203 }204 196 205 $Team = mysql_fetch_assoc($Database->SQLCommand('SELECT *, (SELECT count(*) FROM `user` WHERE `team` = `Team`.`Id`) as `NumberUser`, (SELECT SUM('.substr($Columns, 0, -3).') FROM user '.$Joins.' WHERE `team` = `Team`.`Id`) as`NumberTranslate` FROM `Team` WHERE `Id`='.$_GET['id']));197 $Team = mysql_fetch_assoc($Database->SQLCommand('SELECT *, (SELECT count(*) FROM `user` WHERE `team` = `Team`.`Id`) AS `NumberUser`, (SELECT SUM(`TranslatedCount`) FROM `user` WHERE `team` = `Team`.`Id`) AS `NumberTranslate` FROM `Team` WHERE `Id`='.$_GET['id'])); 206 198 $DbResult = $Database->SQLCommand('SELECT user FROM user WHERE ID='.$Team['Leader']); 207 199 if(mysql_num_rows($DbResult) > 0)
Note:
See TracChangeset
for help on using the changeset viewer.