[CDBI] coding a join

"Arshavir Grigorian" <[email protected]> Sat, 14 Apr 2007 17:18:12 -0700
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
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.

TIA for any ideas.

Arsh

_______________________________________________
ClassDBI mailing list
ClassDBI-Ra3b/[email protected]
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi