Re: Query - IN

From: Joshua Pyle (joshua.t.pyl..mail.com)
Date: Mon Jan 16 2006 - 12:06:40 EST

  • Next message: Tomi NA: "swing rich client/Cayenne/data binding/IoC etc."

    Just use SQLTemplate...
    http://objectstyle.org/cayenne/userguide/fetch/sqltemplate.html

    Then make sure you use Datarows....
    http://objectstyle.org/cayenne/userguide/perform/data-rows.html

    --
    Joshua T. Pyle
    Go has always existed.
    

    On 1/16/06, Chronos <Kronos_..mx.net> wrote: > Hi! > > We use MySQL 4, is there a simple solution to make this query in cayenne? > What I want is at last this: a GroupObject with w = Max(w), r=Max(r) and > so on. > > PHP: > "SELECT Max(w) AS w, Max(r) AS r, Max(e) AS e, Max(d) as d FROM > $grouptable WHERE id IN (".sql2in("SELECT group_id FROM $user2grouptable > WHERE user_id=$userid").")" > > Gr > pk >



    This archive was generated by hypermail 2.0.0 : Mon Jan 16 2006 - 12:06:42 EST