Hi I have these two tables:Customers and Bookings;Customers has these fields CustomerId,firstname,lastname etc.Table bookings has bookingId, customerId,datebooking,startdate,enddate etc.I want to retrieve customerId,first and last name from Customers and datebooking,start and enddate from bookings, I understand I have to use a LEFT JOIN.I tried everything but it does not work, coud someone give me the right code for this? I am running MySQL 5.4.
Fiorentino01^ 0 Newbie Poster
Recommended Answers
Jump to PostAre you sure you want a LEFT JOIN? An INNER JOIN sounds more likely for a bookings list. The left join will give you a list of all the customers, regardless of whether they've made bookings.
All 4 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.