コード例 #1
0
 public static function get_list($_FORM)
 {
     if ($_FORM["taskID"]) {
         $join = " LEFT JOIN comment ON ((interestedParty.entity = comment.commentType AND interestedParty.entityID = comment.commentLinkID) OR (interestedParty.entity = 'comment' and interestedParty.entityID = comment.commentID))";
         $groupby = ' GROUP BY interestedPartyID';
     }
     $filter = interestedParty::get_list_filter($_FORM);
     $_FORM["return"] or $_FORM["return"] = "html";
     if (is_array($filter) && count($filter)) {
         $f = " WHERE " . implode(" AND ", $filter);
     }
     $db = new db_alloc();
     $q = "SELECT * FROM interestedParty " . $join . $f . $groupby;
     $db->query($q);
     while ($row = $db->next_record()) {
         $interestedParty = new interestedParty();
         $interestedParty->read_db_record($db);
         $rows[$interestedParty->get_id()] = $row;
     }
     return (array) $rows;
 }