my $sth = $dbh->preparecached(q(select primarykey from table where primarykey = ?)) or die "Couldn't prepare statement: " . $dbh->errstr; $sth->execute; my ($count) = $sth->fetchrowarray; $sth->finish unless ($count) { ... }
Test for existing data in a db w/ perl.
June 4, 2004
Facing this decision now? We’ll tell you where you stand.
No pitch. No prep. Just answers. We're paid the same whichever vendor you choose.

