mgd_list_topics

Name

mgd_list_topics -- List subtopics

Synopsis

object mgd_list_topics(int topic, string [sort]);

Description

Minimum version: Midgard 1.1.1 (Iron River)

Lists the subtopics of the topic record with id id . The optional sort argument can be used to specify the order in which the results will be listed. Possible values are: "alpha", "reverse alpha", "name", "reverse name", "score", "reverse score", "revised", "reverse revised". If the sort parameter is omitted, the returned topics are ordered by score (descending) and name (ascending).

Returns an object traversable by calling fetch if successfull. Returns false on failure.

Example

<?php
  $lst = mgd_list_topics(17);
  if(!$lst) {
     echo "mgd_list_topics(17) failed.<br>";
     echo "reason: " . mgd_errstr();
  }else{
     while($lst->fetch()){
       echo $lst->name . "<br>\n";
     }
  }
?>