mgd_list_topic_articles_all_of_person

Name

mgd_list_topic_articles_all_of_person -- List articles under topic tree owned by a person

Synopsis

object mgd_list_topic_articles_all_of_person(int topic, int person);

Description

Minimum version: Midgard 1.1.1 (Iron River)

Lists all articles under the topic tree that starts at topic with id id that are owned by person with id person.

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

Example

<?php
  $topic   = 123;
  $person  = 1;
  if($article = mgd_list_topic_articles_all_of_person( $topic, $person)){
    while( $article->fetch() ) {
      echo $article->name . " from " . $article->authorname . "<br>\n";
    }
    echo "$article->N article", ( $article->N == 1) ? '' : 's';
  } else {
    echo "No articles from this author";
?>