Hi,
On Mon, 2002-04-29 at 15:15, Alexander Rigo wrote:
> <?
> $news = mgd_get_topic_by_name ($topic_id, "IE Download");
> $article = mgd_list_topic_articles($news->id);
> if ($article) for ($i = 0; $i < 5 && $article->fetch(); $i++) { ?>
> <p><FONT face=Arial size=1>
> &(article.abstract:p);<br>&(article.field_0);</FONT>
> </p>
>
> <? } ?>
>
> and it worked, except article.field_0 which is empty. The article_field_0 is
> of type file_xxx. What can be the problem?
The mgd_list_xxx functions don't return a full object, for performance
reasons. the parameters are only retrieved with a mgd_get_xxx function.
So you'd want your code to look like this:
<?
$news = mgd_get_topic_by_name ($topic_id, "IE Download");
$alist = mgd_list_topic_articles($news->id);
if ($alist) for ($i = 0; $i < 5 && $alist->fetch(); $i++) {
$article = mgd_get_article($alist->id);
?>
<p><FONT face=Arial size=1>
&(article.abstract:p);<br>&(article.field_0);</FONT>
</p>
<? } ?>
and you should be all fine.
wkr,
--
Envida http://www.envida.net/
Armand A. Verstappen Graadt van Roggenweg 328
[EMAIL PROTECTED] 3531 AH Utrecht
tel: +31 (0)30 298 2255 Postbus 19127
fax: +31 (0)30 298 2111 3501 DC Utrecht
signature.asc
Description: This is a digitally signed message part
