- Timestamp:
- Feb 18, 2009, 7:32:52 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/userlist.php
r91 r101 33 33 <th><a href="?Order=LastLogin&Desc='.$desc.'">Poslední připojení</a></th></tr>'); 34 34 35 $Query = 'SELECT ID,user, LastLogin, GM, ('; 35 $Columns = ''; 36 $Joins = ''; 36 37 foreach($TranslationTree as $Group) 37 38 if($Group['TablePrefix'] != '') 38 $Query .= '(SELECT count(*) FROM `'.$Group['TablePrefix'].'` WHERE (User = user.ID) AND (Complete = 1) AND (Language <> 0)) + '; 39 $Query .= '0) as NumberTranslate FROM `user` ORDER BY '.$order.' '.$desc.' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage']; 39 { 40 $Columns .= 'COALESCE(T'.$Group['Id'].'.Count, 0) + '; 41 $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'; 42 } 43 44 $Query = 'SELECT ID, user.user, LastLogin, GM, ('.substr($Columns, 0, -3).') as NumberTranslate FROM `user`'.$Joins.' ORDER BY '.$order.' '.$desc.' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage']; 45 40 46 $ID = $Database->SQLCommand($Query); 41 while($Line = mysql_fetch_a rray($ID))47 while($Line = mysql_fetch_assoc($ID)) 42 48 { 43 49 if(Licence(LICENCE_MODERATOR))
Note:
See TracChangeset
for help on using the changeset viewer.