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';
}
?>
|