Hi,
ich versuche per SQL, in einer Typo3-ID-BLOB-Sammlung eine ID zu finden:
$res = $db->sql(TYPO3_db,"SELECT TAB1.description,TAB1.preis,TAB1.art,TAB1.uid FROM tabelle1 AS TAB1,tabelle2 AS TAB2 WHERE TAB2.uid IN (SELECT TAB1.id_link FROM tabelle1 AS TAB1B WHERE TAB1.uid=TAB1B.uid)");
id_link ist ein typisches Typo3-BLOB-Feld, in welchem Link-IDs von anderen Tabellen in Form Id1,Id2,Id3... geschrieben werden. Ich möchte halt gucken, ob sich in der Liste eine Id befindet. Wie muss da die korrekte SQL-Syntax lauten? Ich habe mich nach Mysql.org Doku gerichtet (wahrscheinlich jedoch falsch)...
"SELECT s1 FROM t1 WHERE s1 IN (SELECT s1 FROM t2);"
Es kommt nur Fehlermeldung.