mgd_list_reply_articles

(Midgard 1.4.2 'Bifrost')

mgd_list_reply_articles -- List articles in reply of an article

Description

mgd_list_reply_articles (int id)

Minimum version: Midgard 1.1.1

Lists all articles that have their up field set to the id.

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


<?php
 $article = 123;
 $replies = mgd_list_reply_articles( $article );
 if( $replies->N == 0 ) {
  echo "No replies to article $article found.";
 } else {
  echo ($replies-N ==1 ) ? 'reply' : 'replies'," to article $article:&lt;br>";
  while( $replies->fetch() ) {
    echo $replies->title . " by " $replies.authorname<br>\n";
  }
 } 
?>