Ignore:
Timestamp:
Apr 7, 2020, 9:53:00 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Wrong Setup tables initialization.
  • Fixed: Export SQL query compatible with newer SQL server.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/Global.php

    r874 r879  
    588588
    589589    $where = '(`Language` = '.$Config['OriginalLanguage'].') ';
    590     if ($mode == 1) $where .= ' AND EXISTS(SELECT 1 FROM `'.$Table.
     590    if ($mode == 1)
     591    {
     592      $where .= ' AND EXISTS(SELECT 1 FROM `'.$Table.
    591593      '` AS `Sub` WHERE (`Sub`.`Language` <> '.$Config['OriginalLanguage'].
    592594      ') AND (`Sub`.`Entry` = `O`.`Entry`))';
    593     if ($mode == 2) $where .= ' AND NOT EXISTS(SELECT 1 FROM `'.$Table.
     595    }
     596    if ($mode == 2)
     597    {
     598      $where .= ' AND NOT EXISTS(SELECT 1 FROM `'.$Table.
    594599      '` AS `Sub` WHERE (`Sub`.`Language` <> '.$Config['OriginalLanguage'].
    595600      ') AND (`Sub`.`Entry` = `O`.`Entry`))';
     601    }
    596602    $where .= ' AND (';
    597     if (array_search('the', $ArrStr)) $where .= '(`O`.`'.$Column.'` LIKE "The %") OR ';
     603    if (array_search('the', $ArrStr))
     604    {
     605      $where .= '(`O`.`'.$Column.'` LIKE "The %") OR ';
     606    }
    598607
    599608    $SqlOK = false;
     
    618627        //$sql.$where.$groupby.$orderby
    619628//          $buff[] = array($Line['ID'], GetIDbyName($Table), $Line['Orig'], $Line['Tran']);
    620       if ($sqlall <> '') { $sqlall .= ' UNION ALL ( '.$sql.$where.$groupby.' )';}
    621         else {$sqlall .= ' ( '.$sql.$where.$groupby.' )'; }
     629      if ($sqlall <> '')
     630      {
     631        $sqlall .= ' UNION ALL ( '.$sql.$where.$groupby.' )';     
     632      } else {
     633        $sqlall .= ' ( '.$sql.$where.$groupby.' )';             
     634      }
    622635    }
    623636  }
Note: See TracChangeset for help on using the changeset viewer.