in reply to Re: Re: Fetchrow_hashref behaves differently when >1 row in $sth?
in thread Fetchrow_hashref behaves differently when >1 row in $sth?

Just to confirm, are you telling me that you *don't* get the following on the second sql update: ... !! ERROR: 1 undef

Correct, there's no "ERROR" in the output, attached below.

DBI::db=HASH(0x13c60) trace level set to 1 in DBI 1.23-nothread <- prepare('SELECT * FROM files limit 1' CODE)= DBI::st=HASH(0x171 +430) at t.pl line 22 <- execute(CODE)= 1 at t.pl line 24 2 <- fetch= [ 'dat/19980820/ACCT3445' '1451' undef 'D980820.XACCT344 +5' ] row1 at t.pl line 27 2 <- FETCH= [ 'locname' 'size' 'uploadrc' 'rmtname' ] at t.pl line 2 +7 <- fetchrow_hashref= HASH(0x1691a0)4keys row1 at t.pl line 27 <- prepare('UPDATE files SET uploadrc='x' WHERE locname='dat/19980 +820/ACCT3445'' CODE)= DBI::st=HASH(0x171424) at t.pl line 30 <- execute(CODE)= '0E0' at t.pl line 32 <- DESTROY= undef at t.pl line 27 2 <- fetch= undef row1 at t.pl line 27 <- fetchrow_hashref= undef row1 at t.pl line 27 <- DESTROY= undef at t.pl line 13 <- prepare('SELECT * FROM files' CODE)= DBI::st=HASH(0x1699f0) at +t.pl line 22 <- execute(CODE)= 6 at t.pl line 24 2 <- fetch= [ 'dat/19980820/ACCT3445' '1451' 'x' 'D980820.XACCT3445' + ] row1 at t.pl line 27 2 <- FETCH= [ 'locname' 'size' 'uploadrc' 'rmtname' ] at t.pl line 2 +7 <- fetchrow_hashref= HASH(0x169a44)4keys row1 at t.pl line 27 <- prepare('UPDATE files SET uploadrc='x' WHERE locname='dat/19980 +820/ACCT3445'' CODE)= DBI::st=HASH(0x169140) at t.pl line 30 <- execute(CODE)= '0E0' at t.pl line 32 <- DESTROY= undef at t.pl line 27 2 <- FETCH= [ 'locname' 'size' 'uploadrc' 'rmtname' ] at t.pl line 2 +7 <- prepare('UPDATE files SET uploadrc='x' WHERE locname='dat/19980 +820/ACCT3470'' CODE)= DBI::st=HASH(0x168054) at t.pl line 30 <- execute(CODE)= '0E0' at t.pl line 32 <- DESTROY= undef at t.pl line 27 2 <- FETCH= [ 'locname' 'size' 'uploadrc' 'rmtname' ] at t.pl line 2 +7 <- prepare('UPDATE files SET uploadrc='x' WHERE locname='dat/19980 +820/ACH0232'' CODE)= DBI::st=HASH(0x1696d8) at t.pl line 30 <- execute(CODE)= '0E0' at t.pl line 32 <- DESTROY= undef at t.pl line 27 2 <- FETCH= [ 'locname' 'size' 'uploadrc' 'rmtname' ] at t.pl line 2 +7 <- prepare('UPDATE files SET uploadrc='x' WHERE locname='dat/19980 +820/ACH4498'' CODE)= DBI::st=HASH(0x169930) at t.pl line 30 <- execute(CODE)= '0E0' at t.pl line 32 <- DESTROY= undef at t.pl line 27 2 <- FETCH= [ 'locname' 'size' 'uploadrc' 'rmtname' ] at t.pl line 2 +7 <- prepare('UPDATE files SET uploadrc='x' WHERE locname='dat/19980 +821/TD7605G'' CODE)= DBI::st=HASH(0x17149c) at t.pl line 30 <- execute(CODE)= '0E0' at t.pl line 32 <- DESTROY= undef at t.pl line 27 2 <- FETCH= [ 'locname' 'size' 'uploadrc' 'rmtname' ] at t.pl line 2 +7 <- prepare('UPDATE files SET uploadrc='x' WHERE locname='dat/19980 +821/TD7695ReportLegend'' CODE)= DBI::st=HASH(0x169a20) at t.pl line 3 +0 <- execute(CODE)= '0E0' at t.pl line 32 <- DESTROY= undef at t.pl line 27 2 <- fetch= undef row6 at t.pl line 27 <- fetchrow_hashref= undef row6 at t.pl line 27 <- DESTROY= undef at t.pl line 14 <- DESTROY= undef during global destruction
  • Comment on Re: Re: Re: Fetchrow_hashref behaves differently when >1 row in $sth?
  • Download Code