Index: t3lib/tree/tca/class.t3lib_tree_tca_databasetreedataprovider.php =================================================================== --- t3lib/tree/tca/class.t3lib_tree_tca_databasetreedataprovider.php (revision 9506) +++ t3lib/tree/tca/class.t3lib_tree_tca_databasetreedataprovider.php (working copy) @@ -369,9 +404,8 @@ $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'uid', $columnConfiguration['foreign_table'], - " (CONCAT(','," . $columnConfiguration['foreign_field'] . ",',') LIKE '%," . intval($uid) . ",%' " - . (intval($uid) == 0 ? (" OR " . $columnConfiguration['foreign_field'] . " = ''") : '' ) - . ") " + $GLOBALS['TYPO3_DB']->listQuery($columnConfiguration['foreign_field'], intval(uid), $columnConfiguration['foreign_table']) + . (intval($uid) == 0 ? (' OR ' . $columnConfiguration['foreign_field'] . ' = \'\'') : '' ) ); foreach ($records as $record) { $relatedUids[] = $record['uid']; @@ -380,9 +414,8 @@ $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'uid', $columnConfiguration['foreign_table'], - " (CONCAT(','," . $this->getLookupField() . ",',') LIKE '%," . intval($uid) . ",%' " - . (intval($uid) == 0 ? (" OR " . $this->getLookupField() . " = ''") : '' ) - . ") " + $GLOBALS['TYPO3_DB']->listQuery($this->getLookupField(), intval(uid), $columnConfiguration['foreign_table']) + . (intval($uid) == 0 ? (' OR ' . $this->getLookupField() . ' = \'\'') : '' ) ); foreach ($records as $record) { $relatedUids[] = $record['uid']; @@ -393,9 +426,8 @@ $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'uid', $columnConfiguration['foreign_table'], - " (CONCAT(','," . $this->getLookupField() . ",',') LIKE '%," . intval($uid) . ",%' " - . (intval($uid) == 0 ? (" OR " . $this->getLookupField() . " = ''") : '' ) - . ") " + $GLOBALS['TYPO3_DB']->listQuery($this->getLookupField(), intval(uid), $columnConfiguration['foreign_table']) + . (intval($uid) == 0 ? (' OR ' . $this->getLookupField() . ' = \'\'') : '' ) ); foreach ($records as $record) { $relatedUids[] = $record['uid'];