http://qs321.pair.com?node_id=1030390


in reply to Using DBI to extract from 2 databases

You don't need to explicitly "use DBD::mysql" - DBI will handle that for you.

To help with debugging, wrap all your "prepares" and "executes" with eval, like this:

eval { $sth = $self->dbh->prepare( $sql ); }; if ($@) { die "Database error (prepare): ", $self->dbh->errstr; } eval { $sth->execute(); }; if ($@) { die "Database error (execute): ", $self->dbh->errstr; }