boyee007 Posted December 15, 2010 Share Posted December 15, 2010 hi folks, im new to this forum and not a PHP expert so handle me with care Basiclly im trying to create a booking system based on daily time ive got problem with joining multiple table! got 5 tables to join 1. User 2. treatment 3. beautician 4. timeslot 5. bookslot TIMESLOT table (15 minutes gap) id_timeslot | times ----------------------- 1 | 10:00 2 | 10:15 3 | 10:30 so on BOOKSLOT table id_bookslot | id_user | id_treatment | id_timeslot 1 | 24 | 2 | 2 2 | 25 | 1 | 2 3 | 24 | 4 | 3 $mysqli->query("SELECT * FROM bookslot RIGHT JOIN timeslot ON bookslot.id_timeslot = timeslot.id_timeslot LEFT JOIN beautician ON bookslot.id_beautician = beautician.id_beautician"); as you can see on the image, its showing the correct results, except for the times because ive got 2 same id_timeslot in bookslot table i want somthing like in the table B (image) there might somthing wrong on joining the table. any help would be appriciated. thanks in advance [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/221755-joining-mysql-table/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.