in reply to Combining two fetches with DBI and MySQL
It's easier to do this in SQL and not in Perl.
You need to do an outer join between the two tables.
select t1.name, t2.name from t1 left outer join t2 on t1.name = t2.name
You'll get back a two column result set. If a name is in both tables then it will appear in both columns. If it only appears in t1 then the second column will contain NULL.
You then need to write the Perl that handles that and creates your list.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Combining two fetches with DBI and MySQL
by bangers (Pilgrim) on Aug 09, 2006 at 14:30 UTC |