Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6846545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:38:08+00:00 2026-05-27T00:38:08+00:00

I have no idea how to query mysql to display the pattern I want.

  • 0

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:

enter image description here

instead of list all like below
enter image description here

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.
enter image description here

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

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)
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:38:09+00:00Added an answer on May 27, 2026 at 12:38 am
    SELECT customer.companyName, customer.contactName, GROUP_CONCAT(eventinfo.eventTitle ) 
    from eventinfo, testbook, customer 
    where testbook.username=customer.username AND testbook.eventID=eventinfo.eventID
    group by customer.companyName, customer.contactName
    

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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an idea I'm trying to implement. I want to display half a
Does anyone have any idea on how can you create a product filtering query
Alright, so I have a table outputting data from a MySQL table in a
I have a query which shows all images from a user. (In this case
I have a query which shows all images from a user. (In this case
Anybody have any idea why this query isn't working? $result = mysql_query(SELECT * FROM
I have no idea why this won't work. function query($sql) { $this->result = @mysql_query($sql,
I have a table of posts, each post has an IP address, I want
I have registered members and I want to display their names and profile pictures
Anyone have idea about how to bind Boolean in sqlite with objective - c.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.