Ignore:
Timestamp:
Jul 24, 2009, 11:39:21 AM (15 years ago)
Author:
maron
Message:

Plánované úkoly stahování dbc zatím pouze admin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/global_function.php

    r245 r255  
    323323function GetDBCColumns($Version,$DBCFileName)
    324324{
    325   global $Database;
    326   $sql = 'SELECT DBCColumns_'.$DBCFileName.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"';
    327   $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql));
    328   return($DbRow['DBCColumns']);
     325  global $Database,$DBCColumns;
     326  if (isset($DBCColumns[$Version][$DBCFileName]) == false)
     327  {
     328    $sql = 'SELECT DBCColumns_'.$DBCFileName.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"';
     329    $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql));
     330    $DBCColumns[$Version][$DBCFileName] = $DbRow['DBCColumns'];
     331  }
     332    return($DBCColumns[$Version][$DBCFileName]);
    329333}
    330334
    331335function GetDBCColumnIndex($Version,$DBCFileName,$Column)
    332336{
    333   global $Database;
    334        
    335   $sql = 'SELECT '.$DBCFileName.'_'.$Column.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"';
    336   $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql));
    337   return($DbRow['DBCColumns']);
     337  global $Database,$DBCColumnIndex;
     338  if (isset($DBCColumnIndex[$Version][$DBCFileName][$Column]) == false)
     339  {
     340    $sql = 'SELECT '.$DBCFileName.'_'.$Column.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"';
     341    $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql));
     342    $DBCColumnIndex[$Version][$DBCFileName][$Column] = $DbRow['DBCColumns'];
     343  }
     344    return($DBCColumnIndex[$Version][$DBCFileName][$Column]);
    338345}
    339346
Note: See TracChangeset for help on using the changeset viewer.