Ingo Herz wrote:
> I need to specify a filter in mgd_list_topic_articles() to extract only
> specific
> articles depending on the first letter in the title.
You can't directly. You could sort on 'alpha' which returns articles
sorted on title. This at least makes the job easier.
> As there seems to be no detailed info about this in the docs I only know
> about an ID to specify. But how do I specify a filter to get the ID I
> can use in the call? Could someone be so kind to give me a little explanation?
There's nothing in place to use the list functions with a custom filter.
I don't
think it buys much anyway. The speed gain, if any at all, will be
negligable
since we'll still have to pull the entire set of articles to apply the
(assumedly
PHP-written) filter to each. But if you're going to do that, you might
as well do
$article = mgd_list_topic_articles($optic, $sort);
while ($article && $article->fetch()) {
if (!custom_filter($article)) { continue; }
....
}
If anything this lets you make good use of the knowledge that you'll be
sorting them
alphabetically in the fetch and can cut the loop short after your know
last match.
Hope that helps,
Emile
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]