Yeah, that was what I wanted to do, tnx for helping me out!
i never made query's like that with LEFT JOIN and ON ...
I need to add 2 more tables to that query but offcaurse I don't know how 🙁
i tried it my way but that doesn't work
lets name the tables table1 and table2
and they also have a table1.buildingID = building.ID and table1.building.ID = table2.building.ID
I did it like this:
SELECT DISTINCT building.ID
FROM building, table1, table2
LEFT JOIN taken
ON building.ID=taken.buildingID
AND taken.buildingID=table1.buildingID
AND table1.buildingID=table2.buildingID
AND '$fromdate' <= taken.to
AND '$todate' >= taken.from
WHERE taken.buildingID IS NULL
ORDER BY building.ID LIMIT ".$l1.",3";
can you help me out again plz ?
I'm allmost there now 🙂
lots of greetz and many tnx,
Neutje
http://www.neutje.be