in reply to What are some common causes of syntax errors in queries?
Are you checking for errors? The best way to
do this is to set RaiseError to 1:
Then you'll see any errors that your database engine is giving you.# do a $dbh = DBI->connect(...) $dbh->{'RaiseError'} = 1;
Also, try dumping out the hashref that you're getting back:
That'll show you what fields you're getting in the hash ref that you get back. You might also think about using bind_columns, since it's faster. More details in Tricks with DBI.use Data::Dumper; while ($pointer = $sth->fetchrow_hashref) { print Dumper $pointer;
|
---|
In Section
Seekers of Perl Wisdom