Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to display my detail in correct order using MySQL query?
    primarykey
    data
    text
    <p>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:</p> <p><img src="https://i.stack.imgur.com/3I1bt.jpg" alt="enter image description here"></p> <p>instead of list all like below <img src="https://i.stack.imgur.com/s7BvJ.jpg" alt="enter image description here"></p> <p>This is my Query:</p> <pre><code>$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 </code></pre> <p>What should I do to display event without repeat for a customer?</p> <p>The flow is like this, Admin will see customer booked in which event. <img src="https://i.stack.imgur.com/3I1bt.jpg" alt="enter image description here"></p> <p>Next, Admin click on view detail too see customer booked which booth in the selected event. <img src="https://i.stack.imgur.com/YlPsp.jpg" alt="enter image description here"></p> <p>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) <img src="https://i.stack.imgur.com/DUz2r.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload