Hello,
I have following scenario for college design
user table
co int PK
cocd int PK
user varchar(50)
password varchar(50)
colmst table
co int FK
cocd int FK
name varchar(100)
colstumst table
co int FK
cocd int FK
stuid int
stuname varchar(100)
PK is primary key, FK is foreign key.
i have linked user field to field co (I cannot link to co,cocd for user permissions i.e 2 columns for user permission in users table) not a issue currently.
the problem starts here.
when i login co gets linked ok. but co,cocd is primary key for user master. when i login to details table below i have to select cocd value else it will not save the record.
so i want to populate list item only cocd which belongs to co (i.e user linked field) is there anyway out currently when i build list it is showing all cocd
but not the one related to co field. is there a easy way to do this in PHPR.
i think the problem is with where clause. i want to filter cocd which belongs to the logged in co which is attached to user table.
I think the whole thing is clear now.