Teeseract and JOIN tables using a CSV field

Latest News allows us to use content elements within a News. This opens up a vast set of possibilities.

However, when we look in depth, the news manages related content element IDs in a CSV format.

Now this seems like a bad way to mange it, as we do not have a mm_table, and there is no easy way to handle this, than using DB specific functions.

Luckily Tesseract supports most of the MYSQL functions, and thus we can make use of the FIND_IN_SET function here.

ex:
select tt_content.uid,tt_content.header, news.content_elements
FROM tx_news_domain_model_news AS news
LEFT JOIN tt_content
ON find_in_set(tt_content.uid, news.content_elements) WHERE news.uid=1

Hope this helps you.

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark