I’m trying to construct an SQL query that selects data from both tables but it doesn’t seem to be working:
SELECT DISTINCT name,$price
FROM room
WHERE capacity>=$partySize
JOIN room_booking ON room.room_id=room_booking.room_id
WHERE date_booked<>'$us_date';
What am I doing wrong?
Move the WHERE clause down to the bottom: