Subin Thomas

Subin Thomas

  • NA
  • 4.9k
  • 127.1k

how to write a query having multiple conditions ?

Apr 1 2019 5:01 AM
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
 

Answers (5)