Changeset 404 for global.php
- Timestamp:
- Jan 28, 2009, 11:23:01 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
global.php
r403 r404 41 41 function OnlinePlayerCount() 42 42 { 43 global $Database; 44 $Database->select_db('characters'); 43 global $Database, $Config; 44 45 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 45 46 $Result = $Database->select('characters', 'COUNT(*)', 'online=1'); 46 47 $Row = $Result->fetch_array(); … … 50 51 function CharacterCount() 51 52 { 52 global $Database ;53 $Database->select_db( 'characters');53 global $Database, $Config; 54 $Database->select_db($Config['Mangos']['DatabaseCharacters']); 54 55 $Result = $Database->select('characters', 'COUNT(*)'); 55 56 $Row = $Result->fetch_array(); … … 59 60 function AccountCount() 60 61 { 61 global $Database ;62 $Database->select_db( 'realmd');62 global $Database, $Config; 63 $Database->select_db($Config['Mangos']['DatabaseRealmd']); 63 64 $DbResult = $Database->query('SELECT COUNT(*) FROM account'); 64 65 $Row = $DbResult->fetch_array(); … … 68 69 function MangosUptime() 69 70 { 70 global $Database ;71 $Database->select_db( 'mangos');71 global $Database, $Config; 72 $Database->select_db($Config['Mangos']['DatabaseMangos']); 72 73 $DbResult = $Database->query('SELECT `starttime`, `uptime` FROM `uptime` ORDER BY `starttime` DESC LIMIT 1'); 73 74 $Row = $DbResult->fetch_array(); … … 85 86 function RunningEventCount() 86 87 { 87 global $Database ;88 global $Database, $Config; 88 89 $Count = 0; 89 $Database->select_db( 'mangos');90 $Database->select_db($Config['Mangos']['DatabaseMangos']); 90 91 $DbResult = $Database->select('game_event', 'occurence, length, UNIX_TIMESTAMP(start_time) as start', 'end_time > NOW() AND start_time < NOW()'); 91 92 while($Row = $DbResult->fetch_array())
Note:
See TracChangeset
for help on using the changeset viewer.