Open Source Content Management System

mgd_list_persons_in_office

  1. Description

mgd_list_persons_in_office -- List persons linked to a office topic

Description

`object **mgd_list_persons_in_office** (int office, string sort)`

Minimum version: Midgard 1.0

Lists all persons linked to office topic office. The office link in the person record contains an id number that should point to a topic record. This function returns all the person records with the given office link. The optional sort argument can be used to specify the order in which the results will be listed. Possible values include "alpha" and "created" for sorting alphabetically by lastname and firstname or by creation date (ascending) respectively. If this argument is not given, then the results will be sorted by descending creation date so that the most recently created person record in the department is listed first.

Returns an object traversable by calling fetch() if successful. Returns FALSE on failure.

N == 0 ) {  
       echo "No people in office $dept.<br>";  
     } else {  
       while( $people->fetch() ) {  
         echo $people->name . "
\n"; } } ?>
Designed by Nemein, hosted by Anykey