Tell Me
 

Getting Employee Information

Previous previous|next Next Page

The construct_employees() function:

Calls ui_print_header(), ui_print_employees(), and ui_print_footer() to generate the response page

The employee query demonstrates the use of a bind variable in the WHERE clause. A bind variable is a named string prefixed with a colon (:), as in the following example:

...
WHERE department_id = :did
...

A bind variable is a placeholder for an actual value that is supplied when the query is executed.

The $bindargs PHP array variable is created to store the value associated with the query bind variable before it is executed. $bindargs is supplied as a parameter to the db_do_query() function.

Note: The ui_print_employees() function, which generates the HTML table of employee data, detects the presence of the deptid HTTP parameter and creates a Back button to enable the user to navigate back to the page displaying the department information.