Forums

reletionship take excluded data

samir1903 25 Apr, 2019
I have releted two different table based on their codes
first table where the people
second table the statue
i want to list to dropdown table People but their status does not exist yet.
So i can distunguish if their sttus is not entered yet i can add a status

im doing currently
in people module
Status.job != "Yes"
It takes whatever tehere is in status table no
but i want people from people table but their status does not exist

i do this doesnt work
Status.job:People.status

because status doesnt exist in people table it gives error
samir1903 25 Apr, 2019
it is not clear for me

there is two table
People and status

people table has names and id nos of people it doesn have any column with status

status has column of peopleid
this peopleid of status is connected to id of people table

i am on db read where there is people model is related to status model with code number

when i say read yes on where condition
it takes one record

when i say read no on where condition
it takes one records

when i say non of the like null or nothing it takes zero records
because reads from status table record


but i want to read from people table records where there is no records of status table job position
healyhatman 26 Apr, 2019
Sorry, I meant where
table2.foreignkeyfield IS NULL
samir1903 26 Apr, 2019
it gives zero records
because there is only two records registered in table 2
when you exclude them zero
however registered list is in table 1
i want names from table1 exluded records of table1
healyhatman 26 Apr, 2019
You want all records that DONT have an entry in the othet table then use the thing i said. Works for me. If it doesnt work for you post screenshots of your read data setup
This topic is locked and no more replies can be posted.