i want to fetch project details of the user but i want to put a condition on the user
like if a user is a student then he /she can see only his projects
if a user ia a teacher then she can see her class student projects
if a user is a principal then he can see project of all the class students
i have role table which has roles of each person
1=student
2=teacher
3=principal etc
and i have another table from where i am getting project details
how to write such query
even a general syntax can help


Faisal PathanRank #291 · 8.6K reputationPosted Apr 1, 2019, 1:12 AM EDT
Faisal PathanRank #291 · 8.6K reputationPosted Apr 1, 2019, 1:35 AM EDT
Subin ThomasRank #724 · 3.2K reputationPosted Apr 1, 2019, 1:15 AM EDT
Subin ThomasRank #724 · 3.2K reputationPosted Apr 1, 2019, 1:41 AM EDT
Faisal PathanRank #291 · 8.6K reputationPosted Apr 1, 2019, 2:36 AM EDT