Re: Following links in QB

"Piotras" <pp-VVDi8QVAvoBWk0Htik3J/[email protected]>
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
> Hi,
>
> I asked:
>> group?
>
> Ah sorry, I was thinking about GROUP BY instead of parentheses. :-)

No, I am sorry :) I was thinking about limit and order by ;)

>      $qb = new MidgardQueryBuilder("midgard_article");
>      $qb->begin_group("OR");
>      $qb->add_constraint("name", "=", "foo");
>      $subqb = $qb->forward_join("author");
>      $subqb->add_constraint("username", "=", "bar");
>      $qb->end_group();
>      $qb->execute(); // Returns articles named "foo" or authored by "bar"
>

What I understood is that forward_join is $qb->add_constraint("name.otherprop")
compatible and backward_join is extended join , right?

Piotras
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.