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