Hello i have a 2 tables.
table 1: table2:
A---B-----C-----D----
1 - 1 ------ 1 - titel1
1 - 2 ------ 2 - titel2
1 - 5 ------ 3 - titel3
2 - 1 ------ 4 - titel4
2 - 5 ------ 5 - titel5
3 - 6 ------ 6 - titel6
......... ................
As you can see my first table works as a lookup,,both have primairy keys.
now i want to select all from table2 where table1.c = table2.b and table1.A != 1
Table2 is a lookup for an other table with engines, table 1 contains cars.
not all cars can have all engines, but now i want to select all engines which have no relation with a car. if a car can have 2 engines from a total of 10 engines. i want to select those 8 remaining...how???
i normal language,,i want to select from table2 everything,,but not when a number from C has a relation with A.
i know how to do it vice versa,,
($sql = "SELECT * FROM tabel2 LEFT JOIN tabel1 ON tabel1.C = tabel1.B WHERE A = $_GET['id']"
i hope you guys know what i mean.