Changeset 353 for trunk/export/index.php
- Timestamp:
- Mar 3, 2010, 1:42:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/index.php
r329 r353 178 178 else $InitialOrder = ''; 179 179 180 $Columns = ''; 181 $Joins = ''; 182 foreach($TranslationTree as $Group) 183 if($Group['TablePrefix'] != '') 184 { 185 $Columns .= 'COALESCE(T'.$Group['Id'].'.Count, 0) + '; 186 $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'; 187 } 188 $Query = 'SELECT (@I := @I + 1) AS Sequence2, TT.* FROM (SELECT ExportUser.Sequence, T.ID, T.TranslatedCount, T.user, T.XP FROM (SELECT user.ID, user.user, user.XP, ('.substr($Columns, 0, -3).') as TranslatedCount FROM `user`'.$Joins.') AS T'; 180 $Query = 'SELECT (@I := @I + 1) AS Sequence2, TT.* FROM (SELECT ExportUser.Sequence, T.ID, T.TranslatedCount, T.user, T.XP FROM (SELECT user.ID, user.user, user.XP, TranslatedCount FROM `user`) AS T'; 189 181 $Query .=' LEFT JOIN ExportUser ON ExportUser.Export = '.$_GET['ExportId'].' AND ExportUser.User=T.ID'; 190 182 $Query .=' WHERE T.TranslatedCount > 0 ORDER BY COALESCE(ExportUser.Sequence, 100000000)'.$InitialOrder.') AS TT';
Note:
See TracChangeset
for help on using the changeset viewer.