Hi,

Fixed the problem by setting the sitegroup to 1 in the HOST table.

thanks

-----Original Message-----
From: Simon Clayton [mailto:[EMAIL PROTECTED]]
Sent: 12 September 2001 13:18
To: 'midgard'
Subject: [midgard-user] Topic and Articles problem


Hi,

I have the following code in my root page, it firstly tries to get the title
of a known article (16) and display its title.

It then tries to display the abstracts of all articles under the news_topic
(15).

Neither pieces of code returns any information even though article 16 is
linked to topic 15 in the ARTICLE table.

Article 16 and topic 15 are in sitegroup 1, do I need to tell apache that
this host is in sitegroup 1, i.e. do I have
to enter a parameter in midgard-data.conf?  Is this why the code cannot find
these items?


<h2>Latest company news:</h2>

<p>

<?php
$article = mgd_get_article(16);
if(! $article ) {
  echo "failed to get article.<br>\n";
  echo "reason: " . mgd_errstr();
} else {
  echo $article->title . "<br>\n";
}
?>

<?

$news_topic = 15;

$article = mgd_list_topic_articles($news_topic);
echo("article = ".$article);
echo("news_topic = ".$news_topic);

if ($article)

{       echo("Here 1");

        for ($i = 0; $i < 3 && $article->fetch(); $i++)
        {
?>

                <a href="/news/?id=&(article.id);">&(article.title);</a>
                <br>
<?

                if ($article->abstract)
                {
?>
                        &(article.abstract);<br><br>
<?
                }
        }
}
?>

</p>
<h2>End of Company News</h2>

Any help would be greatly appreciated.

regards


Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to