First of all, check if the selected value is stored directly in the field of your MM table or if it is stored in the tl_metamodel_tag_relation table.
Basically you need 3 filters.
If it is stored directely in the field, you can grab all entries with a filter like:
Code:
SELECT * FROM {{table}} WHERE MY-SELECT-FIELD=MY-VALUE
or even better:
Code:
SELECT * FROM {{table}} WHERE MY-SELECT-FIELD IN(MY-VALUE)
The value MY-VALUE is probably the ID of the selected foreign MM Entry.
If it is stored in the ..._realtion Table your query should look like:
HTML-Code:
SELECT mm.* FROM {{table}} AS mm WHERE mm.id IN
(
SELECT tag.item_id
FROM tl_metamodel_tag_relation AS tag
WHERE tag.value_id=MY-VALUE GROUP BY tag.item_id
)
Lesezeichen