my $table_results= $dbh2->prepare("SELECT * from $feed_table WHERE entry_time >= $time"); $table_results->execute(); #Prepare insert statement $sth_insert = $dbh3->prepare("INSERT IGNORE INTO $feed_table (id_code,entry_time,parent_id_code,author_name,author_code,author_url,author_image_url,entry_url,entry_types,status_code,entry_text,entry_data,last_update,pull_time,queue_code) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)") or die $dbh3->errstr; while (my @insert = $table_results->fetchrow_array()) { $sth_insert->execute(@insert) or die $dbh->errstr; #I get no errors }