marcq
Member
Hi,
I can't solve this issue by myself so I would need a quote from you creating an union query.
Issue :
The Database Join Dropdown should display the already saved value + the available time slots start time for the given day.
Needed :
I tried my self to create the needed UNION query without success :
I would need a quote from you to write this union query since it is to complicate for me.
Database Join Dropdown Element | Data-Where tab is empty for now so that you can edit the form. For all details please see "My Sites" : La Neptune.
Thank you in advance for your quote.
Cheers,
Marc
PS :
This is the query retrieving the available time slots start time :
Union Query should "union" this query with a query retrieving the actual in the table saved value. I tried several version but was unable to get a result.
I can't solve this issue by myself so I would need a quote from you creating an union query.
Issue :
- Customer are creating bookings in frontend
a) A query is checking the available time slots and only the available start time are displayed into the dropdown
b) the starttime value is saved into the "book_starttime" field of the "fab_booking" table.
- Administrator can edit the bookings and change the booking day, booking start time.
a) When editing the already saved value is displayed into the dropdown field.
The Database Join Dropdown should display the already saved value + the available time slots start time for the given day.
Needed :
I tried my self to create the needed UNION query without success :
Code:
WHERE {thistable}.id IN (SELECT id +3 FROM (SELECT p1.book_date, t.*, count(p1.book_date) AS nbre FROM fab_booking_taken AS p1 CROSS JOIN fab_booking_slots AS t WHERE NOT ((t.heuredepart_resa < p1.book_end AND t.heurearrivee_resa > p1.book_start)) AND p1.book_date = '{fab_booking___book_bookingdate}' GROUP BY t.id )) UNION (SELECT id +3 FROM (SELECT p1.book_date, t.*, count(p1.book_date) AS nbre FROM fab_booking_taken AS p1 CROSS JOIN fab_booking_slots AS t WHERE ((t.heuredepart_resa < p1.book_end AND t.heurearrivee_resa > p1.book_start)) AND t.id = '{fab_booking___book_starttime}' AND p1.book_date = '{fab_booking___book_bookingdate}' GROUP BY t.id ) AS x WHERE nbre = (SELECT count(p2.book_date) FROM fab_booking_taken AS p2 WHERE p2.book_date = x.book_date))
I would need a quote from you to write this union query since it is to complicate for me.
Database Join Dropdown Element | Data-Where tab is empty for now so that you can edit the form. For all details please see "My Sites" : La Neptune.
Thank you in advance for your quote.
Cheers,
Marc
PS :
This is the query retrieving the available time slots start time :
Code:
WHERE {thistable}.id IN (SELECT id +3 FROM (SELECT p1.book_date, t.*, count(p1.book_date) AS nbre FROM fab_booking_taken AS p1 CROSS JOIN fab_booking_slots AS t WHERE NOT ((t.heuredepart_resa < p1.book_end AND t.heurearrivee_resa > p1.book_start)) AND p1.book_date = '{fab_booking___book_bookingdate}' GROUP BY t.id ) AS x WHERE nbre = (SELECT count(p2.book_date) FROM fab_booking_taken AS p2 WHERE p2.book_date = x.book_date))
Union Query should "union" this query with a query retrieving the actual in the table saved value. I tried several version but was unable to get a result.