Changeset 307 for minimanager/stat.php
- Timestamp:
- Mar 13, 2008, 8:18:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/stat.php
r304 r307 69 69 70 70 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 71 $query = $sql->query("SELECT count(*) FROM `character `");71 $query = $sql->query("SELECT count(*) FROM `characters`"); 72 72 $total_chars = $sql->result($query,0); 73 73 … … 98 98 99 99 //there is always less hordies 100 $query = $sql->query("SELECT count(guid) FROM `character ` WHERE race IN(2,5,6,8,10)");100 $query = $sql->query("SELECT count(guid) FROM `characters` WHERE race IN(2,5,6,8,10)"); 101 101 $horde_chars = $sql->result($query,0); 102 102 $horde_pros = round(($horde_chars*100)/$total_chars ,1); … … 128 128 // RACE 129 129 foreach ($race as $id){ 130 $query = $sql->query("SELECT count(guid) FROM `character ` WHERE race = $id[0] $order_class $order_level $order_side");130 $query = $sql->query("SELECT count(guid) FROM `characters` WHERE race = $id[0] $order_class $order_level $order_side"); 131 131 $race[$id[0]][2] = $sql->result($query,0); 132 132 $race[$id[0]][3] = round((($race[$id[0]][2])*100)/$total_chars,1); … … 151 151 // CLASS 152 152 foreach ($class as $id){ 153 $query = $sql->query("SELECT count(guid) FROM `character ` WHERE class = $id[0] $order_race $order_level $order_side");153 $query = $sql->query("SELECT count(guid) FROM `characters` WHERE class = $id[0] $order_race $order_level $order_side"); 154 154 $class[$id[0]][2] = $sql->result($query,0); 155 155 $class[$id[0]][3] = round((($class[$id[0]][2])*100)/$total_chars,1); … … 174 174 // LEVEL 175 175 foreach ($level as $id){ 176 $query = $sql->query("SELECT count(guid) FROM `character ` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) >= $id[1]176 $query = $sql->query("SELECT count(guid) FROM `characters` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) >= $id[1] 177 177 AND SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) <= $id[2] $order_race $order_class $order_side"); 178 178 $level[$id[0]][3] = $sql->result($query,0);
Note:
See TracChangeset
for help on using the changeset viewer.