o/
So I am working on a rental page for a school project and can't figure out what to do next. :/ So the function's I need to implement are that it should display cars that don't have a reservation yet. As seen below
SELECT * FROM reservering
INNER JOIN auto
ON auto_id = kenteken
WHERE NOT EXISTS (
SELECT * FROM auto
WHERE kenteken = auto_id
)
It doesn't return a value not sure what I did wrong really. And the not displaying a car that has a reservation see code below:
SELECT * FROM reservering
INNER JOIN auto
ON auto_id = kenteken
INNER JOIN merktype
ON merktype_id = id
WHERE auto_id AND ophaaldatum NOT BETWEEN '2022-05-05' AND '2022-05-05' OR retourdatum NOT BETWEEN '2022-05-05' AND '2022-05-07'
Right now it shows the same car multiple times because the same car already has a reservation in the future. I want it to just not display if it already has reservation between the time I am searching for otherwise I will have duplicated reservations on the same day.
Any help will be appreciated take care o>