Re: [CDBI] coding a join
"Thomas Charron" <[email protected]> Sat, 14 Apr 2007 20:34:23 -0400
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
See has_many On 4/14/07, Arshavir Grigorian <[email protected]> wrote: > Hi, > > I have 2 tables - "person" and "contact" where each person can have many > contacts. I would like to code the following SQL into Class::DBI: > > select max(c.create_dt) > from person p, contact c > where p.c_id = c.id > and p.id = ? > > I think I need set_sql() but since Class::DBI expects the set_sql() query to > return a primary key, I am not sure how to proceed. -- -- Thomas