What SELECT query can i use to only show the cars WHERE bookings.status <> 1
so on the table below, cars.id (1, 3, 4, 6) will only show as the result
i'm stuck with this query or of this is any good:
SELECT * FROM `cars` as `C` INNER JOIN `bookings` AS `B` ON `C`.`id` = `B`.`id` ....?
cars
id | name
-- | -------------
1 | Car 1
2 | Car 2
3 | Car 3
4 | Car 4
5 | Car 5
6 | Car 6
bookings
id | car_id | status
-- | ------ | ------
1 | 1 | 0
2 | 2 | 1
3 | 2 | 2
4 | 1 | 0
5 | 5 | 1
EDIT: sorry i wasn't clear here, i also want the others listed as result even though they are not on the bookings table