tab0
id int(11)
auto int(1)
fahrrad int(1)
moto int(1)
tab1
id int(11)
birne int(1)
aepfel int(1)
gemuese int(1)
usw.
tab2
id int(11)
kartoffel int(1)
tomaten int(1)
usw.
Nun möchte ich eine Abfrage starten, der mir zeigt wo tomaten=1, birne=1 und auto=1 bei id=5 mit einer select abfrage...
wie stelle ich das an?
Code: Alles auswählen
select distinct tab0.id from tab0,tab1,tab2i where tomaten=1 AND birne=1 AND auto=1