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