Changeset 12


Ignore:
Timestamp:
Oct 13, 2008, 9:44:52 AM (16 years ago)
Author:
george
Message:
  • Opraveno: Editační prvek pro typ odkaz nabízel nesprávně i více historických záznamů pro jednu položku.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • types/PointerOneToOne.php

    r11 r12  
    2727
    2828  foreach($Lists[$TargetTable]['Items'] as $ListItem)
    29     if($ListItem['VisibleInPointer'] == 1) $Columns .= '`'.$ListItem['Name'].'`," ",';
    30   $Columns = 'CONCAT('.substr($Columns, 0, -1).') AS Name, Id';
    31   $DbResult = $Database->select($TargetTable, $Columns);
     29    if($ListItem['VisibleInPointer'] == 1) $Columns .= 't1.`'.$ListItem['Name'].'`," ",';
     30  $Columns = 'CONCAT('.substr($Columns, 0, -1).') AS Name, t1.Id, t1.ItemId';
     31  $DbResult = $Database->query('SELECT '.$Columns.' FROM `'.$TargetTable.'` AS t1 LEFT JOIN `'.$TargetTable.'` AS t2 ON t1.ItemId=t2.ItemId AND t1.Id < t2.Id WHERE (t2.ItemId IS NULL)');
    3232  //echo($Database->LastQuery);
    3333  if($DbResult->num_rows > 0)
Note: See TracChangeset for help on using the changeset viewer.