Changeset 40
- Timestamp:
- Jun 16, 2009, 6:16:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/server.php
r39 r40 137 137 $DbRow = $DbResult->fetch_row(); 138 138 $State['AccountCount'] = $DbRow[0]; 139 $DbResult = $this->Database->query('SELECT uptime FROM server'.$this->Id.'_realmd.uptime AS T ORDER BY T.startstring DESC'); 140 $DbRow = $DbResult->fetch_assoc(); 141 $State['Uptime'] = $DbRow['uptime']; 139 $DbResult = $this->Database->query('SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA = "server'.$this->Id.'_realmd" AND TABLE_NAME = "uptime"'); 140 $DbRow = $DbResult->fetch_row(); 141 if($DbRow[0] > 0) 142 { 143 $DbResult = $this->Database->query('SELECT uptime FROM server'.$this->Id.'_realmd.uptime AS T ORDER BY T.startstring DESC'); 144 $DbRow = $DbResult->fetch_assoc(); 145 $State['Uptime'] = $DbRow['uptime']; 146 } else $State['Uptime'] = 0; 142 147 } else 143 148 {
Note:
See TracChangeset
for help on using the changeset viewer.