- Timestamp:
- Oct 13, 2008, 9:44:52 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
types/PointerOneToOne.php
r11 r12 27 27 28 28 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)'); 32 32 //echo($Database->LastQuery); 33 33 if($DbResult->num_rows > 0)
Note:
See TracChangeset
for help on using the changeset viewer.