I've got a table structure like (simplified):
content
- id_content
- my_string1
- ...
content_has_content
- id_content
- id_subcontent
topic_has_content
- id_topic
- id_content
Any topic can have multiple 'content', any 'content' can have multiple 'subcontent' (instance of content).
With a given id_topic I'd like to recieve a list of all my_string1 from the linked contents, subcontents, subcontents-of-subcontents, and so on.
I understand "WITH" is not working for mysql but cannot find a nice recursive alternative.
Thanks
daniel
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…