I have no idea how to query mysql to display the pattern I want. The table store all booking details of customers. A customer may multiple booking from multiple events. And in 1st stage I only want to check the customer had booking in which event. If customerA booked in event ABC, event XZY, so system will only display:

instead of list all like below

This is my Query:
$query = "SELECT customer.companyName, customer.contactName, eventinfo.eventTitle,boothAlias,date, testbook.bstatus, testbook.day, testbook.username, bookingID from eventinfo, testbook, customer where testbook.username=customer.username AND testbook.eventID=eventinfo.eventID
What should I do to display event without repeat for a customer?
The flow is like this, Admin will see customer booked in which event.

Next, Admin click on view detail too see customer booked which booth in the selected event.

Lastly, Admin click to view booth details to see customer booked which day for the booth.
(Assume event booth will be rent for exhibition for 14days, customer can choose which day to book, 1st 3days, last few days or in the middle)

If I understand your problem correctly, this will return you the desired list, but events will be comma seperated