my $sth = $dbh->prepare("SELECT userid FROM subscription") or die DBI: +:errstr; $sth->execute() or die DBI::errstr; my %db; while( my ( $id ) = $sth->fetchrow_array() ) { $db{ $id } = 1; } my @in_db = grep { defined( $db{ $_ } ) } @compare_array;
In reply to Re: Comparing an array to a DBI table
by Masem
in thread Comparing an array to a DBI table
by oakbox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |