My database has 4 tables: employees, location_groups, functional_groups, and department_groups.
The web page filtering is based on the Location, Function, and Department.
I need to select the employees based on something like this:
I think this will involve separate identifiers for the checkboxes in the different sections, but I have no idea how to proceed.Code:
INNER JOIN `location_groups` ON (`employees`.`location_group` = `location_groups`.`id`)
INNER JOIN `functional_groups` ON (`employees`.`functional_group` = `functional_groups`.`id`)
INNER JOIN `department_groups` ON (`employees`.`department_group` = `department_groups`.`id`)
(employees.location_group = '7' OR
`employees`.`location_group` = '6') AND
(`employees`.`functional_group` = '2' OR
`employees`.`functional_group` = '4')
Can someone help, please?
I don't expect anyone to do this for me, but I would really appreciate a little hand holding and maybe a nudge in the right direction.