DBD::mysql::st execute failed: Duplicate entry '10157236320140648_1015
+7237405105648' for key 'PRIMARY' at rdscopy.pl line 94.
DBD::mysql::st execute failed: Duplicate entry '10157236320140648_1015
+7237405105648' for key 'PRIMARY' at rdscopy.pl line 94.
##print and insert at the same time
while( my @results = $table_results->fetchrow_array())
{
print join(",",@results);
print "\n";
$sth_insert->execute(@results);
}
But I do not get that duplicate error when I use the code below, do you know why? Its the same data
while (my $insert = $table_results->fetchrow_array()) {
$sth_insert->execute(@$insert);
}
|