James Gifford <[EMAIL PROTECTED]> wrote:
> I wanted to use the articles table because I'm using direct MySQL select
> queries to select articles. I couldn't see how I could get midgard to
> do something like this:
> $sql = "select id, title, name, extra1, topic, abstract, url,
> created as created from article where ";
> $sql .= "(topic in ($topic_ids_in_tree) or ";
$article = mgd_list_topic_articles($topic)
$articles->fetch()
> $sql .= "extra1 in ($topic_ids_in_tree) or print = $location_id) and ";
> $sql .= "(date_add(created, interval 6 month) > now()) and ";
> $sql .= "sitegroup = " . $midgard->sitegroup;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is midgard core.
> $sql .= " and type=3 order by created desc";
mgd_list_topic_articles(all types to be filtered)
> I needed to be able to sort by primary topic (topic), secondary topic
> (extra1) and physical location (print) and document type (type).
> So an article might have:
> primary topic - Forests
$article->topic(Forests topic)
> secondary topic - corporate campaign
$article->parameter("_topic","GUID",$corporate->guid);
> location - New South Wales
$article->print(int which points to New South);
Piotras
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]