Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#...more code above, all variable previously declared and strict is al +so been used. push @all_names, $names; push @email, $email; push @local, $local; push @year, $year; } #end of foreach. #Getting data my $dbh = DBI->connect("DBI:ODBC:$myserver",$u, $p) || print "Connect +fail: $!"; my $vals = join("," ,map { $dbh->quote($_) } @all_names ); my $sql = "SELECT DISTINCT name, email, addr, location FROM my_users WHERE year = $year /* need all the values f +rom @year */ AND email = $email /* need all the values f +rom @email */ AND location = $local /* need all the value +s from @local */ AND name IN ($vals) /* thats how I need */ ";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI, MAP Help!
by kennethk (Abbot) on Apr 30, 2009 at 19:24 UTC | |
by runrig (Abbot) on Apr 30, 2009 at 20:28 UTC | |
by kennethk (Abbot) on Apr 30, 2009 at 21:36 UTC | |
|
Re: DBI, MAP Help!
by runrig (Abbot) on Apr 30, 2009 at 19:20 UTC | |
by Anonymous Monk on Apr 30, 2009 at 19:39 UTC | |
|
Re: DBI, MAP Help!
by CountZero (Bishop) on May 01, 2009 at 07:27 UTC |