Re: Weird DBI/DBD-mysql problem

Rudy Lippan <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
On Thu, 17 Feb 2005, Sehn, Timothy wrote:

> I am having a problem with these modules and I was wondering if anyone has run into it before:
> 
> Amazon::ContactUs::ReportDB::get_types(/apollo/_env/devcentral-2534631/perl/lib/perl-std-5.6.1/Amazon/ContactUs/ReportDB.pm:391):
> 391:       my $sth = $this->{DB}->prepare("select type_name from faq_type;");
> 
>   DB<2> n
> Amazon::ContactUs::ReportDB::get_types(/apollo/_env/devcentral-2534631/perl/lib/perl-std-5.6.1/Amazon/ContactUs/ReportDB.pm:392):
> 392:       $sth->execute();
> 
>   DB<2> n
> Amazon::ContactUs::ReportDB::get_types(/apollo/_env/devcentral-2534631/perl/lib/perl-std-5.6.1/Amazon/ContactUs/ReportDB.pm:394):
> 394:       while ( my $ref = $sth->fetchrow_hashref() )
> 395:       {
> 
>   DB<2> use Data::Dumper
> 
>   DB<3> p Dumper $sth->fetchrow_hashref()
> $VAR1 = {
>           '@' => 'Build/Compile/Link Errors'
>         };

1. Is there a reason that you are calling fetchrow_hashref() in a loop as well 
as in the loop conditional?

2. I can't for the life of me figure out why you are getting that (But that 
might just fall out of my not being able to read right now ;) ). Could you send 
a DBI->trace(9) of that section of code and I'll see if I can make sense of 
that.

Rudy


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.