Can you post the next few lines from the trace, upto just after fetchrow_hashref returns?
Sure,
<snip>
!! ERROR: 1146 CLEARED by call to fetchrow_hashref method
-> fetchrow_hashref for DBD::mysql::st (DBI::st=HASH(0x8eb747c)~0x8d29af8) thr#8d29008
1 -> FETCH for DBD::mysql::st (DBI::st=HASH(0x8d29af8)~INNER 'NAME') thr#8d29008
-> dbd_st_FETCH_attrib for 08eb753c, key NAME
1 <- FETCH= [ 'name' ] at db_test.pl line 19
1 -> fetch for DBD::mysql::st (DBI::st=HASH(0x8d29af8)~INNER) thr#8d29008
-> dbd_st_fetch for 08eb753c, chopblanks 0
Table 'test.table_not_exists' doesn't exist error 1146 recorded: Table 'test.table_not_exists' doesn't exist
!! ERROR: 1146 'Table 'test.table_not_exists' doesn't exist' (err#0)
1 <- fetch= undef row2 at db_test.pl line 19
!! ERROR: 1146 'Table 'test.table_not_exists' doesn't exist' (err#0)
<- fetchrow_hashref= undef row2 at db_test.pl line 19
DBD::mysql::st fetchrow_hashref failed: Table 'test.table_not_exists' doesn't exist at db_test.pl line 19.
-> DESTROY for DBD::mysql::st (DBI::st=HASH(0x8d29af8)~INNER) thr#8d29008
</snip>
This represents the last evaluation of the while loop expression in the following test code:
<snip> #!/usr/bin/perl
use strict; use warnings;
use DBI;
my $dbh = DBI->connect (
"dbi:mysql:host=localhost;port=3306",
'test',
'somepass',
{RaiseError => 1, PrintError => 0});$dbh->trace(4);
my $topSTH = $dbh->prepare ("SELECT name FROM test.table_exists");
$topSTH->execute ();while (my $hRef = $topSTH->fetchrow_hashref ()) { print STDERR "Retrieved: ".$hRef->{name}."\n"; eval {
my $inSTH = $dbh->prepare ("SELECT foo FROM test.table_not_exists");
$inSTH->execute ();
};
if ($@) {
print STDERR "ERR: [EMAIL PROTECTED]";
}}
print STDERR "db_test finishing up.\n"; print STDERR "LAST: [EMAIL PROTECTED]" if ($@); </snip>
Thanks, Joel
