# Zusammenhang zweier Shopware6 Tabellen möglich?

**URL:** <https://forum.shopware.com/t/zusammenhang-zweier-shopware6-tabellen-moeglich/104218>\
**Category:** Programmierung\
**Tags:** general\
**Created:** [7. Juni 2024 um 07:45 UTC](https://forum.shopware.com/t/zusammenhang-zweier-shopware6-tabellen-moeglich/104218 "2024-06-07T07:45:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas.kipp](https://avatars.discourse-cdn.com/v4/letter/t/b5e925/32.png) [@thomas.kipp](https://forum.shopware.com/u/thomas.kipp)\
**Post date:** [7. Juni 2024 um 07:45 UTC](https://forum.shopware.com/t/zusammenhang-zweier-shopware6-tabellen-moeglich/104218/1 "2024-06-07T07:45:00Z")

</div>

Hallo,  
ist es möglich, einen Zusammenhang zwischen der Tabelle seo\_url und product\_category herzustellen, und falls ja, welche Tabellen sind dabei involviert?

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [7. Juni 2024 um 08:24 UTC](https://forum.shopware.com/t/zusammenhang-zweier-shopware6-tabellen-moeglich/104218/2 "2024-06-07T08:24:51Z")

</div>

Sollte über die Spalten foreign\_key, route\_name und path\_info in Tabelle seo\_url und category\_id der Tabelle product\_category möglich sein - jetzt aber nicht getestet.

---

<div class="post-metadata">

**Author:** ![Dennis\_Konoppa](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/dennis_konoppa/32/27245_2.png) [@Dennis\_Konoppa](https://forum.shopware.com/u/Dennis_Konoppa)\
**Post date:** [7. Juni 2024 um 09:34 UTC](https://forum.shopware.com/t/zusammenhang-zweier-shopware6-tabellen-moeglich/104218/3 "2024-06-07T09:34:30Z")

</div>

über Folgenden JOIN Möglich:

```auto
SELECT
    *
FROM
    seo_url seo
JOIN
    product_category pc
    ON (seo.foreign_key = pc.category_id)
WHERE
    seo.route_name = 'frontend.navigation.page'
    AND seo.is_canonical = 1 # optional, um nur die aktuelle SEO-URL zu joinen

```

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/9/29c7587ba660f00e4995d1743162782e5d6d8653.svg) [@system](https://forum.shopware.com/u/system)\
**Post date:** [7. Juli 2024 um 09:34 UTC](https://forum.shopware.com/t/zusammenhang-zweier-shopware6-tabellen-moeglich/104218/4 "2024-07-07T09:34:32Z")

</div>

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.
