Display Data by Foreign Key

ha har7801 14 Dec, 2019
So I am building a login page for members to register their availability. Can get so far that they can log it and it will do all Im after except this last step. I want the Names column in the table to display the names logged against it for that day. The day and date are in one DB with a unique key, the names registered are in another DB but get logged with the same unique key as the day they belong to. I ts a simply matching relationship, just dont know what Im doing.
​
Got to the point, I have two models loaded in a single DB read, pointing to the correct DBs. Im just missing a small thing Im sure of it. Debug below.
​
The name field it appearing, just not populating any data.
​
I can get it to display one name, but its only one, some have a dozen against the day.
​
Is this a limit of the table column?
​
I can enter the data and it will throw up a heap of names but not filtered if I view a table within the column from the same DB read.
​
Thanks.
​
​
Display Data  by Foreign Key image 1
​
Display Data  by Foreign Key image 2
​
This is when one name gets up instead of all the names for that day. I have a group for the days to keep it showing only one result for the day, else it puts out one day with one name and so on. Not what Im after.
​
Display Data  by Foreign Key image 3
ha har7801 15 Dec, 2019
So Im getting close, I can display all the records recorded in each row, but it display All records in all rows. So Im guessing I need a where clause. So I can filter each list by the Event Column. Both the names and the event share a common random key (av_random) or I can have the names recorded with the same result as the event name, eg: Sunday, Monday. I can go either way. (av_name).
​
Loading into a table called (av_events).
Column called in to the table (Article.av_event)
DB Read (read_av)
Event and Name shared key both called (av_random)
​
Am I on the right path.
​
Display Data  by Foreign Key image 4
This topic is locked and no more replies can be posted.