[TYPO3-core] RFC: Feature #2540: t3lib_db add possible of recursive mm queries
ingo schmitt
mailinglisten at i-schmitt.de
Mon Dec 31 14:12:10 CET 2007
Hi Steffen,
sorry, I haven't seen this change in my SVN history. I should have read
the whole source before posting this. But maybe the comment of the
method should be changed accordingly that a recursive M:M Query is possible.
Ingo
> "ingo schmitt" <mailinglisten at i-schmitt.de> schrieb im Newsbeitrag
> news:mailman.1.1199036431.7193.typo3-team-core at lists.netfielders.de...
>> This is an SVN patch request
>>
>> Type: Feature
>>
>> Bugtracker reference:
>> http://bugs.typo3.org/view.php?id=2540
>>
>>
>> Branches:
>> Trunk only
>>
>> Problem:
>> Currently the t3lib_db allows M:M queries only to different database
>> tables but not to the same table. This is handy, if you are builing tree
>> relations like in commerce and other extension with own trees.
>>
>> Solution:
>> The attached patch addes a new method to t3lib_db which allows recursive
>> queries. This is done by prefixing one of the tables in the query by ft
>> and passing the new data to the exiting exec_SELECT_mm_query.
>> Therfore a change in the DBAL Classes is not needed!
>>
>> Comments:
>> The original patch was revied by Michael Stucki, Karsten Dambekalns,
>> Thomas Hempel during the T3DD07, but was somhow not commited to trunk.
>>
>> Greetings from Neukirchen,
>>
>> Ingo
>> --
>> Ingo Schmitt mailto:is at marketing-factory.de
>> Marketing Factory Consulting GmbH http://typo3.marketing-factory.de/
>> Content Management mit Typo3: Beratung - Schulung - Realisierung
>
> Hi Ingo,
>
> just a question - why should it not possible to use same table double ? If i
> look to SELECT_mm_query, there is the possibility, and beginning of the
> function there is this:
>
> if($foreign_table == $local_table) {
> $foreign_table_as = $foreign_table.uniqid('_join');
> }
>
> vg Steffen
>
>
Mit freundlichen Gruessen
--
Ingo Schmitt mailto:is at marketing-factory.de
Marketing Factory Consulting GmbH http://typo3.marketing-factory.de/
Content Management mit Typo3: Beratung - Schulung - Realisierung
More information about the TYPO3-team-core
mailing list