Changeset 544


Ignore:
Timestamp:
Jun 17, 2013, 10:43:16 PM (11 years ago)
Author:
chronos
Message:
  • Optimalizace: SQL dotaz pro výpis tabulky překladů.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/TranslationList.php

    r543 r544  
    197197  $Query = 'SELECT `T`.`ID`, `T`.`Entry`, `T`.`VersionStart`, `T`.`VersionEnd`, '.
    198198    '`T`.`'.$TranslationTree[$Filter['Group']]['Items'][0]['Column'].'`, '.
    199     '(SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `T`.`User`) AS `UserName`, '.
    200     '(SELECT `User`.`Id` FROM `User` WHERE `User`.`ID` = `T`.`User`) AS `UserId`, '.
    201     '(SELECT `Language`.`Name` FROM `Language` WHERE `Language`.`ID` = `T`.`Language`) AS `LanguageName`, '.
    202     '(SELECT `ClientVersion`.`Version` FROM `ClientVersion` WHERE `ClientVersion`.`BuildNumber` = `T`.`VersionStart`) AS `VersionStartText`, '.
    203     '(SELECT `ClientVersion`.`Version` FROM `ClientVersion` WHERE `ClientVersion`.`BuildNumber` = `T`.`VersionEnd`) AS `VersionEndText` '.
    204     'FROM `'.$Table.'` AS `T` WHERE 1 '.$Filter['SQL'];
     199    '`User`.`Name` AS `UserName`, `User`.`ID` AS `UserId`, '.
     200    '`Language`.`Name` AS `LanguageName`, `TS`.`Version` AS `VersionStartText`, `TE`.`Version` AS `VersionEndText` '.
     201    'FROM `'.$Table.'` AS `T` '.
     202    'LEFT JOIN `User` ON `User`.`ID` = `T`.`User` '.
     203    'LEFT JOIN `Language` ON `Language`.`ID` = `T`.`Language` '.
     204    'LEFT JOIN `ClientVersion` AS `TS` ON `TS`.`BuildNumber` = `T`.`VersionStart` '.
     205    'LEFT JOIN `ClientVersion` AS `TE` ON `TE`.`BuildNumber` = `T`.`VersionEnd` '.
     206    'WHERE 1 '.$Filter['SQL'];
    205207 
    206208  // Get total item count
  • trunk/form.php

    r536 r544  
    7878
    7979  $Output .= '<br />'.
    80     'Verze: <b>'.GetVersionWOW($Line['VersionStart']).' - '.GetVersionWOW($Line['VersionEnd'].'</b>').
     80    'Verze: <b>'.GetVersionWOW($Line['VersionStart']).' - '.GetVersionWOW($Line['VersionEnd']).'</b>'.
    8181    '<br />';
    8282   
Note: See TracChangeset for help on using the changeset viewer.