Changeset 146 for stat/stat.php


Ignore:
Timestamp:
Nov 24, 2007, 6:01:41 PM (17 years ago)
Author:
george
Message:

Opraveno: Správné načítání z databáze mangosu characters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stat/stat.php

    r47 r146  
    1010$RealmPassword = $Password;
    1111$RealmDatabase = 'realmd';  // must contains zone_coordinates and accounts table
     12$CharactersDatabase = 'characters';  // must contains zone_coordinates and accounts table
    1213$EmuVersion = $Config['Mangos']['Version'];
    1314$Owner = $Config['Web']['Admin'];
     
    2324{
    2425  global $Hostname, $Username, $Password, $Database, $EmuVersion, $Owner, $ServerName, $realm_db, $DatabaseEncoding,
    25   $RealmHostname, $RealmUsername, $RealmPassword, $RealmDatabase;
     26  $RealmHostname, $RealmUsername, $RealmPassword, $RealmDatabase, $CharactersDatabase;
    2627   
    2728  $Result =
     
    5960  $db_result = mysql_query("SET NAMES $DatabaseEncoding", $mangos_db);
    6061 
    61   $db_result = mysql_query("SELECT * FROM `character` WHERE `online`='1' ORDER BY `name`", $mangos_db);
     62        $characters_db = mysql_connect($RealmHostname, $RealmUsername, $RealmPassword);
     63        mysql_select_db($CharactersDatabase, $characters_db);
     64  $db_result = mysql_query("SET NAMES $DatabaseEncoding", $characters_db);
     65
     66  $db_result = mysql_query("SELECT * FROM `character` WHERE `online`='1' ORDER BY `name`", $characters_db);
    6267        while($result = mysql_fetch_array($db_result))
    6368        {
Note: See TracChangeset for help on using the changeset viewer.