in reply to Re^3: Place holders in SQL query
in thread Place holders in SQL query
It worked!
Thanks for the help!
my $citydata = $dbh->exec_select( "select city,state from mytable whe +re city = ?", $city ); my @states = map {$_->{state}} @$citydata; my $statedata = join ' OR ', map { "state = ?" } @$citydata; my $codedata = $dbh->exec_select( "select code from othertable where +(year=2014 and ($statedata)), @states );
Thanks for the help!
In Section
Seekers of Perl Wisdom