Test for existing data in a db w/ perl.

|
my $sth = $dbh->prepare_cached(q(select primary_key from table where primary_key = ?)) or die "Couldn't prepare statement: " . $dbh->errstr; $sth->execute; my ($count) = $sth->fetchrow_array; $sth->finish unless ($count) { ... }

About this Entry

This page contains a single entry by Max Clark published on June 4, 2004 2:05 PM.

Yahoo DomainKeys was the previous entry in this blog.

Email Warfare is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

View Max Clark's profile on LinkedIn
Powered by Movable Type 4.1