Can you not just join the tables ?
pojmy $sql = 'SELECT A.code FROM othertable as A LEFT JOIN mytable AS B ON B.state = A.state WHERE A.year=? AND B.city=?'; my $codedata = $dbh->selectall_arrayref( $sql, undef, 2014, $city );
In reply to Re: Place holders in SQL query
by poj
in thread Place holders in SQL query
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |