mgd_list_topic_calendar_all_fast

Name

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

Synopsis

object mgd_list_topic_calendar_all_fast(int topic, int [type]);

Description

Minimum version: Midgard 1.1.1 (Iron River)

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 successfull. Returns false on failure.

Example

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