I'm working on a quick API to campsite the will fetch article titles,
sections titles, etc from the database, give the IDs for same. I need
this for my stats thing, since I'm trying to design it so that the stats
engine can be mounted on a separate system. Originally I thought I'd
just pull the data out of the database directly. But then I though I
might be able to do that using your DatabaseObject class. Is there an
efficient way for example to get *all* article titles for a given issue
of a given publication using this approach? Or is the direct database
approach still the best/simplest?
This will return to you an array of Article objects. You have the
option of specifying as many or as few of the parameters as you want.
Look at the classes/Article.php file for the full documentation. A
quick example: print the article titles in the issue with ID 1,
publication ID 2:
The publication class wasnt very developed in 2.3, in 2.4 it has the
same functionality. You'll notice that the Article::GetArticles() does
not use the $sqlOptions argument. This will probably change in 2.4.
- Paul
John Pye wrote:
> Hi Mugur,
>
> I'm working on a quick API to campsite the will fetch article titles,
> sections titles, etc from the database, give the IDs for same. I need
> this for my stats thing, since I'm trying to design it so that the stats
> engine can be mounted on a separate system. Originally I thought I'd
> just pull the data out of the database directly. But then I though I
> might be able to do that using your DatabaseObject class. Is there an
> efficient way for example to get *all* article titles for a given issue
> of a given publication using this approach? Or is the direct database
> approach still the best/simplest?
>
> JP
>