[TYPO3-mvc] Using mm-table for sorting in query

Marc Bastian Heinrichs typo3 at mbh-web.de
Mon Feb 28 13:14:20 CET 2011


Hey,

>> SELECT * FROM album
>> JOIN gallery_album_mm mm ON mm.foreign_uid = album.uid
>> ORDER BY mm.foreign_sorting
>>
>> But there is no join in repository queries... so what can I do?
> 
> I fear your albums need a backreference to the gallery. After having 
> that it shouldn't be a big deal. Is it possible for you to add 
> backreferences to the albums?

With the query above and by using an backrefence you will get the
sorting of galleries for albums (foreign_sorting) and not the sorting
albums for galleries (sorting).


Best
Marc Bastian


More information about the TYPO3-project-typo3v4mvc mailing list