Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
We recently upgraded perl from 5.8 to 5.10
we discovered after the upgrade that the fetchrow_array loop ends abruptly
code snippet:
my $searchSQL = $dbh->prepare($sql1);
my $insertSQL = $dbh->prepare($sql2);
$searchSQL->execute();
while (my ($id,$name) = $searchSQL->fetchrow_array()) {
$insertSQL->execute($id,$name);
$insertSQL->finish;
}
if I comment out the "$insertSQL->execute($id,$name);" it loops thru all the records.
the code perfectly works in 5.8 but not in 5.10
any ideas?
Thanks
we discovered after the upgrade that the fetchrow_array loop ends abruptly
code snippet:
my $searchSQL = $dbh->prepare($sql1);
my $insertSQL = $dbh->prepare($sql2);
$searchSQL->execute();
while (my ($id,$name) = $searchSQL->fetchrow_array()) {
$insertSQL->execute($id,$name);
$insertSQL->finish;
}
if I comment out the "$insertSQL->execute($id,$name);" it loops thru all the records.
the code perfectly works in 5.8 but not in 5.10
any ideas?
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: fetchrow_array loop in perl 5.10
by Corion (Patriarch) on Sep 18, 2014 at 08:08 UTC | |
by choroba (Cardinal) on Sep 18, 2014 at 10:39 UTC | |
by Anonymous Monk on Sep 18, 2014 at 13:43 UTC | |
by bulrush (Scribe) on Sep 18, 2014 at 19:33 UTC | |
by erix (Prior) on Sep 18, 2014 at 19:54 UTC | |
Re: fetchrow_array loop in perl 5.10
by McA (Priest) on Sep 18, 2014 at 07:20 UTC | |
by Anonymous Monk on Sep 18, 2014 at 07:34 UTC | |
Re: fetchrow_array loop in perl 5.10
by mje (Curate) on Sep 18, 2014 at 08:27 UTC | |
by Anonymous Monk on Sep 18, 2014 at 09:02 UTC | |
by mje (Curate) on Sep 18, 2014 at 10:07 UTC | |
by Anonymous Monk on Sep 18, 2014 at 13:26 UTC | |
by mje (Curate) on Sep 18, 2014 at 15:08 UTC | |
| |
Re: fetchrow_array loop in perl 5.10
by sundialsvc4 (Abbot) on Sep 18, 2014 at 12:21 UTC | |
Re: fetchrow_array loop in perl 5.10
by andal (Hermit) on Sep 18, 2014 at 14:12 UTC | |
| |
Re: fetchrow_array loop in perl 5.10
by TomDLux (Vicar) on Sep 19, 2014 at 00:41 UTC | |
by Anonymous Monk on Sep 19, 2014 at 08:50 UTC | |
by mr_mischief (Monsignor) on Sep 19, 2014 at 13:44 UTC | |
Re: fetchrow_array loop in perl 5.10
by Limbic~Region (Chancellor) on Nov 17, 2016 at 19:02 UTC |
Back to
Seekers of Perl Wisdom