mgd_list_topic_calendar_all_fast

(Midgard 1.4.2 'Bifrost')

mgd_list_topic_calendar_all_fast -- List articles under topic (sub)tree in a time window

Description

object mgd_list_topic_calendar_all_fast (int topic, int [type])

Minimum version: Midgard 1.1.1

Lists calendar entry articles under the topic tree starting at topic with id topic. Normally the function returns the calendar entries that are currently happening or happen in future. The entries are sorted by date. To list old calendar entries or to limit a query to a specific time range, use the alternative function signature. mgd_list_topic_calendar_all_fast() function is faster than mgd_list_topic_calendar_all() but the fields authorname, calendar, acalendar, alcalendar, startdate, enddate, calstart, calstop are not defined.

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


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