Calendar custom WHERE clause? Advice needed

Topics related to AppGini plugins/add-ons go here.
Post Reply
mdannatt
Veteran Member
Posts: 41
Joined: 2020-01-27 17:34

Calendar custom WHERE clause? Advice needed

Post by mdannatt » 2022-03-17 14:56

Hi All

Looking for some advice.
I have a table SUBJECT, which contains two columns: ID, SUBJECT and TEACHER. For each subject added, admin must also add a teacher from a dropdown menu linked to table TEACHERS (containing ID and TEACHER NAME)

I have set up a calendar based on a third table, called SCHEDULE (ID, time_start, time_end, subject (links to SUBJECT and teacher (AUTOFILL).
Here is my problem. I need to create a custom where clause so that I can colour each class according to their TEACHER. The problem is that
[where] `teacher`= 'John Smith' doesn't work. Nor does [where] `teacher`= 1 doesn't work either, since the integer value relates to the SUBJECT, not the TEACHER.

Any thoughts much appreciated. Maybe I am missing something simple.
Roses are red, Violets are blue, unexpected '}' on line 32

Post Reply