Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Combining two fetches with DBI and MySQL

by blogical (Pilgrim)
on Aug 08, 2006 at 16:31 UTC ( [id://566205]=note: print w/replies, xml ) Need Help??


in reply to Combining two fetches with DBI and MySQL

Pull the results off each table into arrays. Run a map over both arrays to increment the value of the key that matches the name. Bold if value > 1.
my @table1 = GetNames( 'Table1'); my @table2 = GetNames( 'Table2'); my %names = (); map {$names{$_}++} (@table1, @table2); while (my ($name, $weight) = each %names) { if ( $weight > 1 ) { PrintBoldly($name); } else { PrintNormally($name); } }

"One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
- Henry David Thoreau, Walden

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://566205]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-20 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found