les09 get emp tm





Getting Employee Information










The interactions in this eCourse require Javascript to be enabled.



 

Getting Employee Information


previous|next





The construct_employees() function:




Builds and executes the query to obtain the employee records for a specific department



Obtains the department ID from the deptid HTTP request parameter. If this parameter is not set, then one of the conditions in the query WHERE clause is structured to return all employee rows.



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.

 









Wyszukiwarka

Podobne podstrony:
les09 get?pt tm
les09 disp emp tm
les09 page handling tm
les09 cre ui tm
les09 disp?pt tm
les09 create? logic tm
les09 crectl logic tm
les09 credb connect tm
les09 login page tm
les09 logout page tm
les09 cregen query tm
les09 create? conn prop tm
les09 getstart tm
function domnode get content
The Best Way to Get Your Man to Commit to You
function mcrypt module get algo key size
Destiny´s Child Get on the Bus

więcej podobnych podstron