Skip to content
Advertisement

change where statement given a case

I have a table which contains users info. with the columns:

  • id_staff
  • email
  • id_supervisor
  • id_branch
  • id_department

and I want to select the information in this table depending on a variable like

How can I change the where statement based on the variable

Example:

Advertisement

Answer

Use boolean logic. You seem to want:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement