Changeset 244


Ignore:
Timestamp:
Jul 12, 2009, 1:41:25 PM (15 years ago)
Author:
maron
Message:

Vylepšení opravy sloupce Take

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/action.php

    r216 r244  
    110110        echo ($Table.' ');
    111111               
    112                 $sql = 'SELECT ID,entry as entry_tran, (SELECT ID FROM '.$Table.' WHERE Language = 0 AND entry = entry_tran LIMIT 1) as ID_orig FROM '.$Table.' WHERE (Language <> 0) AND (Take = 0)';
     112                $sql = 'SELECT ID,entry as entry_tran, Take,
     113                 (SELECT ID FROM '.$Table.' WHERE Language = 0 AND entry = entry_tran LIMIT 1) as ID_orig
     114                  FROM '.$Table.' as tran WHERE (Language <> 0) AND ((Take = 0) OR (ID = Take) OR NOT EXISTS(SELECT 1 FROM '.$Table.' WHERE ID = tran.Take))';
    113115               
    114116            $ID = $Database->SQLCommand($sql);
Note: See TracChangeset for help on using the changeset viewer.