| Summary: | The Hairdresser Booking Read show all the booking record instead of itself booking record | ||
|---|---|---|---|
| Product: | CS3343 Salon Booking System | Reporter: | Ng Ming Chak <mingcng8-c> |
| Component: | hairdresser.booking.Read | Assignee: | Samuel <samuelip4-c> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | mingcng8-c |
| Priority: | --- | ||
| Version: | 2.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS | ||
|
Description
Ng Ming Chak
2023-11-17 12:46:18 HKT
The bug was caused by the incorrect SQL statement. It select all the record.
sql = "SELECT booking_id, booking_customer_id, C.user_name, booking_hairdresser_id, H.user_name, booking_date, booking_time, " +
"booking_duration, booking_services, booking_subtotal, booking_discount, booking_grandtotal, booking_status " +
"FROM bookings B, users C, users H WHERE " +
"B.booking_customer_id = C.user_id AND " +
"B.booking_hairdresser_id = H.user_id AND " +
"B.booking_date LIKE '" + selectedYear + "-" + selectedMonth + "%' AND ";
i add "B.booking_hairdresser_id = " + UserInfo.userID in the function read to fix the problem.
|