This topic is locked
[SOLVED]

How can i fix this?

11/25/2023 3:19:16 AM
PHPRunner General questions
I
I author

Hello everyone. I am working on building a program for preparing a schedule. The program administrator can schedule a date for a group of visitors with this program. Each visiting group needs a guide (or several) to give a tour. Each guide can enter a date in the program if he/she is unable to give a tour on a chosen date.
When drawing up a schedule, a date is first chosen. The manager can then select a guide who is NOT available on the chosen date. I created 2 tables for this:
1 Userstable (name varchar 70, ID integer, email)
2 Absence table (name varchar 70, IDNR integer, date )
The intention is that I can see a list (view, query) of all guides who can be present on the selected date. How can I fix this? Any help is welcome and thanks in advance.

G
Grdimitris 11/25/2023

create a custom view with Usertable and Absence table. The SQL script is
SELECT
userstable.ID,
userstable.name,
userstable.email,
absence.date
FROM userstable
LEFT OUTER JOIN absence ON userstable.ID = absence.IDNR

This you wrote "The manager can then select a guide who is NOT available on the chosen date" confuses my but if you want all guides that not entered a date to absence table then in the field you need the list use the lookup wizard, as table select the above custom view link and display field name for insance and in WHERE write this
(absence.date1 !=':tourdate') or (absence.date1 is null)

I
I author 11/26/2023

Thanks for this helpful tip while I was running a query with this code. Works well. Thank you