On Fri, Sep 20, 2002 at 03:44:31PM +0100, Tim Bunce wrote:
> I need to be able to list all the tables in a connected database,
> then for each table list of columns. I tried to use your table_info(),
> column_info(), interface but it returns 'DBI::st=HASH(...blah...)'.
> Trying to output that reference to Data::Dumper returns
> $VAR1 = bless({}, DBI::st)
As documented, these methods return statement handles, on which you call
fetch methods to get the actual info.
For example:
my $sth = $dbh->table_info();
while (my(@info) = $sth->fetchrow_array()) {
print join("\t", @info), "\n";
}
Ronald