Howdy all -
I am trying to hit a MySQL database using DBI::mysql. I am trying to get
table information using the SQL - "SHOW TABLE STATUS".
The statement handle prepares and then executes as it should, but when I try
to get the info via $sth->fetchall_hashref, I get the following error:
=================================================
DBI fetchall_hashref: invalid number of parameters: handle + 0 Usage:
$h->fetchall_hashref()
=================================================
I'm not sure what form the data will be in when this statement is executed,
but the hashref is a hopeful thing.
Here is the code after a good connection to the database -
=================================================
eval{$sth = $dbh->prepare("SHOW TABLE STATUS");};
print qq[Error - $@ <br />] if $@; # No error here
eval{$sth->execute();};
print qq[Error - $@ <br />] if $@; # No error here
my $ar_TableInfo;
eval{$ar_TableInfo = $sth->fetchall_hashref;};
print qq[Error - $@ <br />] if $@; # Error occurs here
print qq[About to iterate the array of hashrefs.....<br />];
foreach my $hr_TableInfo (@$ar_TableInfo)
{
foreach my $key (keys %{$hr_TableInfo})
{print qq[$key is $hr_TableInfo->{$key}<br />];}
}
=================================================
Any help here would be greatly appreciated.
Peace -
Ron
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>