Changeset 255 for trunk/includes/global_function.php
- Timestamp:
- Jul 24, 2009, 11:39:21 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global_function.php
r245 r255 323 323 function GetDBCColumns($Version,$DBCFileName) 324 324 { 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]); 329 333 } 330 334 331 335 function GetDBCColumnIndex($Version,$DBCFileName,$Column) 332 336 { 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]); 338 345 } 339 346
Note:
See TracChangeset
for help on using the changeset viewer.