in reply to Column info request.

Here is a VERY MySQL specific way of doing it:
use strict; use warnings; use DBI; use CGI::Pretty qw(:standard); my $dbh = DBI->connect( ... ); my @table = @{ $dbh->selectcol_arrayref('show tables') }; for my $table (@table) { my $sth = $dbh->prepare("select * from $table limit 1"); $sth->execute(); print "$table:", br(); print ol(li $sth->{NAME} ); }
And please do not use the FONT tag to color text. Use CSS instead. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: Re: Column info request.
by jdtoronto (Prior) on Feb 05, 2004 at 04:22 UTC
    how about:
    my $dbfields = $dbh->selectcol_arrayref ("SHOW COLUMNS FROM table" +);
    is even more MySQL'ish and gives all the details of the fields.

    jdtoronto

Re: Re: Column info request.
by exussum0 (Vicar) on Feb 05, 2004 at 08:32 UTC
    The oracle equiv query would be "select table_name from user_tables". Just to throw it out there.

    Play that funky music white boy..