in reply to Re: Getting a list of columns from a MySQL Table
in thread Getting a list of columns from a MySQL Table
Thanks, I saw the fetchrow_hashref routine and tried something like:
for my $i(sort @tables) { print uc $i . "\n\n"; ## get a list of columns for the table my $sth = $dbh->prepare("LISTFIELDS $i"); $sth->execute; my $row = $sth->fetchrow_hashref(); for my $header(keys %{$row}) { print " $header\n"; } $sth->finish; sleep 1; }
but still no dice. I'll try your code and see what it yields. Thanks! -c
In Section
Seekers of Perl Wisdom