in reply to Re^3: Database copy table with DBI
in thread Database copy table with DBI
Use of uninitialized value $results14 in join or string at rdscopy.pl line 92. and I also get
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); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Database copy table with DBI
by choroba (Cardinal) on Nov 15, 2016 at 08:31 UTC | |
|
Re^5: Database copy table with DBI
by poj (Abbot) on Nov 15, 2016 at 10:31 UTC | |
by cbtshare (Monk) on Nov 16, 2016 at 03:56 UTC | |
by soonix (Chancellor) on Nov 16, 2016 at 09:49 UTC |