How to filter data in table view based on other tables

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
ayussuf
Veteran Member
Posts: 39
Joined: 2021-01-20 17:15

How to filter data in table view based on other tables

Post by ayussuf » 2021-01-25 01:16

Hi,

I have 3 tables, let say they are like this:

Table1 = Student (id, name, ...)
Table2 = Supervisor (id, name, ...)
Table3 = Supervision (id, student=Student.id, supervisor=Supervisor.id, owner, ...)

If Supervisor login and open Table1 (Student), he will see his assigned Students only .

I think the query for doing this filtering is like this:

Code: Select all

SELECT * FROM Student AS stdn LEFT JOIN Supervision AS spvn ON spvn.student = stdn.id LEFT JOIN Supervisor AS spvr ON spvr.id=spvn.supervisor WHERE spvr.id='$memberInfo['username']'
But I don't know how to activate it on table view.

Can some one help me.

Thanks.
AppGini 5.92 - Upgraded to 5.94

Post Reply