Ignore:
Timestamp:
Mar 9, 2010, 1:01:14 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Přejmenovány všechny tabulky textů na názvy s prvními velkými písmeny ve slovech plus pro odlišení s prefixem Text.
  • Upraveno: Další SQL dotazy doplněny o SQL uvozovky.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/create_addon.php

    r334 r366  
    104104    $CreatedFileListCount = array();
    105105 
    106     $DbResult = $this->Database->query('SELECT `group`.* FROM `ExportGroup` JOIN `group` ON `group`.`Id` = `ExportGroup`.`Group` WHERE `ExportGroup`.`Export`='.$this->Id.' AND `group`.`TablePrefix` != ""');
     106    $DbResult = $this->Database->query('SELECT `Group`.* FROM `ExportGroup` JOIN `Group` ON `Group`.`Id` = `ExportGroup`.`Group` WHERE `ExportGroup`.`Export`='.$this->Id.' AND `Group`.`TablePrefix` != ""');
    107107    while($Group = $DbResult->fetch_assoc())
    108108    {
     
    123123        $Buffer = 'CZWOW_'.$Column['AddonFileName'].'_count='.$FileIndex.';CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={';
    124124   
    125         $Query = 'SELECT T2.'.$Column['Column'].' AS Translation, T3.'.$Column['Column'].' as Original FROM (SELECT T1.entry, T1.'.$Column['Column'].' FROM (SELECT entry,'.$Column['Column'].' FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND VersionStart <= '.$this->ClientVersion['BuildNumber'].' AND VersionEnd >= '.$this->ClientVersion['BuildNumber'].' AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS T1 GROUP BY T1.entry) as T2 JOIN '.$Group['TablePrefix'].' AS T3 ON (T2.entry = T3.entry) AND (T3.Language = 0)';
     125        $Query = 'SELECT `T2`.`'.$Column['Column'].'` AS `Translation`, `T3`.`'.$Column['Column'].'` AS `Original` FROM (SELECT `T1`.`Entry`, `T1`.`'.$Column['Column'].'` FROM (SELECT `Entry`,`'.$Column['Column'].'` FROM `'.$Group['TablePrefix'].'` WHERE (`Complete` = 1) AND (`VersionStart` <= '.$this->ClientVersion['BuildNumber'].') AND (`VersionEnd` >= '.$this->ClientVersion['BuildNumber'].') AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS `T1` GROUP BY `T1`.`Entry`) AS `T2` JOIN `'.$Group['TablePrefix'].'` AS `T3` ON (`T2`.`Entry` = `T3`.`Entry`) AND (`T3`.`Language` = 0)';
    126126        $DbResult2 = $this->Database->query($Query);
    127127       
    128128       
    129129        if ($this->Database->affected_rows == 0) {
    130                         $ID = $this->Database->query('SELECT MAX(`VersionEnd`) FROM `'.$Group['TablePrefix'].'`');
    131                         $BuildNumber_max = $ID->fetch_assoc();
    132                         $BuildNumber_max = $BuildNumber_max['MAX(`VersionEnd`)'];
    133                        
    134                         $Query = 'SELECT T2.'.$Column['Column'].' AS Translation, T3.'.$Column['Column'].' as Original FROM (SELECT T1.entry, T1.'.$Column['Column'].' FROM (SELECT entry,'.$Column['Column'].' FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND VersionStart <= '.$BuildNumber_max.' AND VersionEnd >= '.$BuildNumber_max.' AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS T1 GROUP BY T1.entry) as T2 JOIN '.$Group['TablePrefix'].' AS T3 ON (T2.entry = T3.entry) AND (T3.Language = 0)';
     130      $ID = $this->Database->query('SELECT MAX(`VersionEnd`) FROM `'.$Group['TablePrefix'].'`');
     131      $BuildNumber_max = $ID->fetch_assoc();
     132      $BuildNumber_max = $BuildNumber_max['MAX(`VersionEnd`)'];
     133     
     134      $Query = 'SELECT `T2`.`'.$Column['Column'].'` AS `Translation`, `T3`.`'.$Column['Column'].'` AS `Original` FROM (SELECT `T1`.`Entry`, `T1`.`'.$Column['Column'].'` FROM (SELECT `Entry`,`'.$Column['Column'].'` FROM `'.$Group['TablePrefix'].'` WHERE (`Complete` = 1) AND (`VersionStart` <= '.$BuildNumber_max.') AND (`VersionEnd` >= '.$BuildNumber_max.') AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS `T1` GROUP BY `T1`.`Entry`) AS `T2` JOIN `'.$Group['TablePrefix'].'` AS `T3` ON (`T2`.`Entry` = `T3`.`Entry`) AND (`T3`.`Language` = 0)';
    135135            $DbResult2 = $this->Database->query($Query);
    136                         
    137                 }
     136      
     137    }
    138138       
    139139        while($Line = $DbResult2->fetch_assoc())
     
    202202  function MakeReadme()
    203203  {
    204     $DbResult = $this->Database->query('SELECT * FROM verseclient ORDER BY DATE DESC');
     204    $DbResult = $this->Database->query('SELECT * FROM `CzWoWPackageVersion` ORDER BY `Date` DESC');
    205205    $Line = $DbResult->fetch_assoc();
    206206
     
    216216 
    217217 Verze:
    218   Verze Addonu: '.$Line['verse'].'
     218  Verze Addonu: '.$Line['Version'].'
    219219  Tato verze je pro verzi hry '.$this->ClientVersion['Version'].'
    220220 
     
    222222 
    223223    ';
    224     $DbResult = $Database->query('SELECT * FROM verseclient ORDER BY DATE
    225 DESC');
     224    $DbResult = $Database->query('SELECT * FROM `CzWoWPackageVersion` ORDER BY `Date` DESC');
    226225    while($Line = $DbResult->fetch_assoc())
    227226    {
    228227      $Buffer .='
    229   Verze: '.$Line['verse'].'
     228  Verze: '.$Line['Version'].'
    230229  =============
    231230  '.$Line['text'].'
Note: See TracChangeset for help on using the changeset viewer.