pp wrote:
> Hi!
>
> I changed a little admin site and have one problem with sorting articles
> if article
> has any content
>
> <?
> $article = mgd_list_topic_articles($id, alpha);
>
> while ($article->fetch()){
>
> if ($article->content){
> echo "no content";}
> ?>
> <a href="&(host.prefix);/&(article.id);">&(article.title);</a>
> <a href="&(host.prefix);/&(article.id);?action=modify">modify</a><br>
> <? } ?>
>
> everything works fine but this sorting. I got "no content" even if
> article has a content or not.
Content isn't fetched with the _list_ functions for efficiency reasons;
most of the time, if you want a listing you want summary info, not the
content. In this case, do:
$article = mgd_list_topic_articles($id,
"alpha");
if ($article) while ($article->fetch()) {
$art = mgd_get_article($article->id);
if ($art->content) { /* etc */ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]