Changeset 596 for trunk/inc/server.php
- Timestamp:
- May 20, 2009, 8:26:17 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/server.php
r583 r596 27 27 28 28 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 29 $pocet = $this->db->query('SELECT `id` FROM `account` WHERE `online` = 1')->num_rows; 30 return($pocet); 29 $DbResult = $this->db->query('SELECT COUNT(*) FROM `account` WHERE `online` = 1'); 30 $DbRow = $DbResult->fetch_row(); 31 return($DbRow[0]); 31 32 } 32 33 … … 48 49 global $Config; 49 50 50 $this->db->select_db($Config['Mangos']['DatabaseCharacters']); 51 $pocet = $this->db->query('SELECT `guid` FROM `characters` WHERE `online` = 1')->num_rows; 52 return($pocet); 51 $this->db->select_db($Config['Mangos']['DatabaseCharacters']); 52 $DbResult = $this->db->query('SELECT COUNT(*) FROM `characters` WHERE `online` = 1'); 53 $DbRow = $DbResult->fetch_row(); 54 return($DbRow[0]); 53 55 } 54 56 … … 87 89 88 90 $this->db->select_db($Config['Mangos']['DatabaseCharacters']); 89 $row = $this->db->query('SELECT COUNT(*) FROM characters')->fetch_ array();91 $row = $this->db->query('SELECT COUNT(*) FROM characters')->fetch_row(); 90 92 return($row[0]); 91 93 } … … 96 98 97 99 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 98 $row = $this->db->query('SELECT COUNT(*) FROM account')->fetch_ array();100 $row = $this->db->query('SELECT COUNT(*) FROM account')->fetch_row(); 99 101 return($row[0]); 100 102 }
Note:
See TracChangeset
for help on using the changeset viewer.