ID, Name, PLZ , Ort, Bundesland, Name2, PLZ2 , ORT2, Bundesland2
z.b
ID1 Stefan 6200 Badrack Berlin NULL NULL NULL NULL
ID2 NULL NULL NULL NULL Stefan 6200 Badrack Berlin
Jetzt mach ich gerade eine abfrage
mysql_query("SELECT ... FROM ... WHERE name NOT LIKE '' AND plz NOT LIKE '' AND ort NOT LIKE '' AND Bundesland NOT LIKE ' AND name2 LIKE '' AND plz2 LIKE '' ORT2 LIKE '' AND Bundesland2 LIKE '')
gut jetzt gibt er mir nur den Datensatz 1 aus.
ich möchte aber dass er jetzt noch ein oder einbaut so in etwa
mysql_query("SELECT ... FROM ... WHERE name NOT LIKE '' AND plz NOT LIKE '' AND ort NOT LIKE '' AND Bundesland NOT LIKE '' OR (name2 NOT LIKE '' AND plz2 NOT LIKE '' AND ort2 NOT LIKE '' AND Bundesland2 NOT LIKE '' AND name LIKE '' AND plz LIKE '' AND ort LIKE '' AND Bundesland LIKE ''))
das funktioniert aber irgendwie nicht obwhol ich die 2 Abfrage dann in Klammer gesetzt habe. Das ganze ergibt in diesem Beispiel kein sinn aber in dem Projekt das ich gerade mache schon.
Könnt ihr mir da vielleicht schnell weiterhelfen.
Vielen Dank