---
title: "Mask Datenbankstruktur"
url: "https://www.typo3.net/d/128317-mask-datenbankstruktur"
source: "typo3.net"
tags: ["Extensions","Datenbank","Frage","TYPO3 8"]
created: "2020-09-24"
last_reply: "2020-10-01"
replies: 4
solved: false
page: 1
pages: 1
lang: "de"
---

# Mask Datenbankstruktur

Extensions · 4 Antworten · gestartet 2020-09-24

## Eröffnungsbeitrag

**sanktusm** · 2020-09-24 · [Beitrag #1](https://www.typo3.net/d/128317-mask-datenbankstruktur/1)

Hallo,
ich möchte zwei Datensätze zusammenführen. Ich habe ein Masktemplate für Produkte, mit dem ich Contentelemente einbinden kann.

also:
header
content
usw.

Nun möchte ich eine mysql-Abfrage einrichten, die eine Tabelle tx_mask_colors mit der Tabelle tt_content verknüpft.

Kann mir jemand sagen, wie ich das Mache oder ob es vielleicht eine Systematische Übersicht über die Abhängigkeiten von tt_content und tx_mask Tabellen gibt?

## Antworten

### [#2](https://www.typo3.net/d/128317-mask-datenbankstruktur/2) · sanktusm · 2020-09-24

So bin ich etwas vorangekommen:

SQL_NO_CACHE tt_content.header, tt_content.pid, tx_mask_colors.tx_mask_colors_title
FROM
tt_content, tx_mask_colors
WHERE
( ( tt_content.header LIKE '%ATP%' ) OR
( tt_content.pid LIKE '%ATP%' ) OR
( tx_mask_colors.tx_mask_colors_title LIKE '%ATP%' ) ) AND
( tt_content.t3_origuid IN(tx_mask_colors.uid) )

allerdings gibt mir das Query immer nur eine Farbe aus, warum?

### [#3](https://www.typo3.net/d/128317-mask-datenbankstruktur/3) · sanktusm · 2020-09-24

HMM dieser Schritt ist schon näher dran, vielleicht mit left join verbinden?

SQL_NO_CACHE tt_content.header, tt_content.pid, tx_mask_colors.tx_mask_colors_title
FROM
tt_content ,tx_mask_colors
WHERE
( ( tt_content.header LIKE '%ATP%' ) OR
( tt_content.pid LIKE '%ATP%' ) OR
( tx_mask_colors.tx_mask_colors_title LIKE '%ATP%' ) ) AND
( tt_content.uid = tx_mask_colors.parentid )

### [#4](https://www.typo3.net/d/128317-mask-datenbankstruktur/4) · sanktusm · 2020-09-25

Hmm so bekomme ich eine Ausgabe, leider ist tx_mask_colors_title immer null, Warum?

SELECT tt_content.header, tt_content.pid, tx_mask_colors.tx_mask_colors_title
FROM
tt_content
left join tx_mask_colors ON
 tx_mask_colors.parentid IN ( tt_content.tx_mask_colors)

WHERE
tt_content.header LIKE '%ATP%'

### [#5](https://www.typo3.net/d/128317-mask-datenbankstruktur/5) · sanktusm · 2020-10-01

Also mein Template sieht so aus, ich komme leider nicht weiter. Wäre nett, wenn mir jemand helfen könnnte

<f:if condition="{data.tx_mask_details}">
<f:for each="{data.tx_mask_details}" as="data_item">
<f:cObject typoscriptObjectPath="lib.tx_mask.content">{data_item.uid}</f:cObject><br />
</f:for>
</f:if>

---

Quelle: „Mask Datenbankstruktur“, typo3.net, https://www.typo3.net/d/128317-mask-datenbankstruktur
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
