mgd_list_topic_articles_all_fast

(Midgard 1.4.2 'Bifrost')

mgd_list_topic_articles_all_fast -- List articles under topic tree

Description

object mgd_list_topic_articles_all_fast (int topic, string [sort], int [type], int [up])

Minimum version: Midgard 1.1.1

Lists all articles under the topic tree that starts at topic with id topic. mgd_list_topic_articles_all_fast() function is faster than mgd_list_topic_articles_all() but the field authorname is not defined.

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


<?php
  $topic = 123;
  $article = mgd_list_topic_articles_all_fast( $topic, "score");
  if( $article->N == 0 ) {
     echo "No article";
  } else {
     while( $article->fetch() ) {
       echo $article->name;
     }
  echo "$article->N article", ( $article->N == 1 ) ? '' : 's';
  }
?>