Changeset 68 for trunk/www/model/server.php
- Timestamp:
- Aug 9, 2009, 8:28:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/model/server.php
r67 r68 330 330 return($DbRow[0]); 331 331 } 332 333 function UpdateRealmlistAccountCount() 334 { 335 global $Config; 336 337 $this->Database->query('TRUNCATE TABLE server'.$this->Id.'_realmd.realmcharacters'); 338 $DbResult = $this->Database->select('Realm', '*', 'Server = '.$this->Id); 339 while($Realm = $DbResult->fetch_assoc()) 340 { 341 $this->Database->query('INSERT INTO server'.$this->Id.'_realmd.realmcharacters (SELECT '.$Realm['Id'].' AS realmid, server'.$this->Id.'_realmd.account.id AS acctid, (SELECT COUNT(*) FROM realm'.$Realm['Id'].'_characters.characters WHERE realm'.$Realm['Id'].'_characters.characters.account = server'.$this->Id.'_realmd.account.id) AS numchars FROM server'.$this->Id.'_realmd.account)'); 342 } 343 } 332 344 } 333 345
Note:
See TracChangeset
for help on using the changeset viewer.