[CDBI] coding a join

Arshavir Grigorian grigorian at gmail.com
Sun Apr 15 01:18:12 BST 2007


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digitalcraftsmen.net/pipermail/classdbi/attachments/20070414/17ed3267/attachment.htm

More information about the ClassDBI mailing list