Tell Me
 

Getting Department Information

Previous previous|next Next Page

The construct_departments() function:

Uses a query that joins the DEPARTMENTS, EMPLOYEES, LOCATIONS, and COUNTRIES tables to obtain extended information about a department, including the number of employees
Calls ui_print_header(), ui_print_department(), and ui_print_footer() to generate the response page

Note: To display department data, construct_department() calls ui_print_department(), which creates a hypertext link with the "number of employees" field. When the user clicks the generated link, it issues an HTTP request to the hr.php code with ?do=showemp and the associated department ID so that construct_employees() is called to display the employees for that department.