I have a mysql table for bookings
Bookingid Customer
1 Steve
2 John
and another table for passengers
Bookingid Passenger
1 Steve
1 Gary
1 Tom
2 John
2 Chris
2 Thomas
What is the best query to get bookingid from the first table and passengers from the second table, in a single row ?
Bookingid Passenger1 Passenger2 Passenger3
1 Steve Gary Tom
2 John Chris Thomas