Subject: | Document Bug |
Date: | Fri, 13 Jun 2008 11:12:54 -0600 |
To: | bug-DBD-mysql [...] rt.cpan.org |
From: | JC <tapoutmma [...] gmail.com> |
http://search.cpan.org/~capttofu/DBD-mysql-4.007/lib/DBD/mysql.pm
In the docs, I see
do {
print "\nRowset ".++$i."\n---------------------------------------\n\n";
foreach $colno (0..$sth->{NUM_OF_FIELDS}) {
print $sth->{NAME}->[$colno]."\t";
}
I was getting an error, and noticed that the example has a bug in it.
If I have 2 columns, $sth->{NUM_OF_FIELDS} will return 2. So the
foreach loop will iterate 3 times and give a concatenation warning.
Not a big issue, just letting you know... 0..$sth-{NUM_OF_FIELDS}-1
.. fixed it.
Thanks for the great module!
JC