Changeset 147 for trunk/import/index.php
- Timestamp:
- Mar 5, 2009, 8:18:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/import/index.php
r144 r147 6 6 function ImportSQLMangos() 7 7 { 8 global $Database, $TranslationTree ;8 global $Database, $TranslationTree, $Config; 9 9 10 10 echo('Načítání textů z databáze MaNGOSu...'); … … 14 14 { 15 15 echo('<br />'.$Group['Name'].'<br />'); 16 $Columns = '`'.$Group['MangosDatabase'].'`.`'.$Group['MangosTable'].'`.`'.$Group['MangosTableIndex'].'`'; 16 $DbName = $Config['Database']['MangosPrefix'].$Group['MangosDatabase']; 17 $Columns = '`'.$DbName.'`.`'.$Group['MangosTable'].'`.`'.$Group['MangosTableIndex'].'`'; 18 $Where = ''; 17 19 foreach($Group['Items'] as $GroupItem) 18 $Columns .= ', `'.$Group['MangosDatabase'].'`.`'.$Group['MangosTable'].'`.`'.$GroupItem['MangosColumn'].'` AS `'.$GroupItem['Column'].'`'; 19 $Query = 'SELECT '.$Columns.' FROM `'.$Group['MangosDatabase'].'`.`'.$Group['MangosTable'].'`'; 20 { 21 $Columns .= ', `'.$DbName.'`.`'.$Group['MangosTable'].'`.`'.$GroupItem['MangosColumn'].'` AS `'.$GroupItem['Column'].'`'; 22 $Where .= ' OR `'.$DbName.'`.`'.$Group['MangosTable'].'`.`'.$GroupItem['MangosColumn'].'` != "" '; 23 } 24 $Where = substr($Where, 4); 25 $Query = 'SELECT '.$Columns.' FROM `'.$DbName.'`.`'.$Group['MangosTable'].'` WHERE '.$Where; 20 26 //echo($Query.'<br />'); 21 27 $Count = 0;
Note:
See TracChangeset
for help on using the changeset viewer.