mgd_list_topic_articles_all_of_person

(Midgard 1.4.2 'Bifrost')

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

Description

object mgd_list_topic_articles_all_of_person (int topic, int person)

Minimum version: Midgard 1.1.1

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 successful. Returns FALSE on failure.


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