[CDBI] Class::DBI and M:M
"Arshavir Grigorian" <[email protected]> Sat, 17 Mar 2007 19:05:44 -0700
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
Hello, I have a table "contact" and another table "link" which has 2 foreign keys to "contact" - contact_id_1 and contact_id_2. This is essentially a many-to-many relationship, but with only 2 tables. I would like to know how to handle this with Class::DBI. I would also like to know how to extend Class::DBI to allow me to search like this: select contact_id_1 from link where contact_id_2 = ? union select contact_id_2 from link where contact_id_1 = ? Thanks. Arsh _______________________________________________ ClassDBI mailing list ClassDBI-Ra3b/[email protected] http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi