in reply to Fetch Rover?

CandymanCID, take a look at the database tutorials here at the Monastery first. If you're still in need of help, wander over to CPAN and look at the various DBD and DBI modules. If you still find yourself in need of assistance, come visit us again and provide us with a more specific list of your requirements and, more importantly, what you've accomplished so far.

- - arden.

Replies are listed 'Best First'.
Re: Re: Fetch Rover?
by McMahon (Chaplain) on Apr 01, 2004 at 20:52 UTC
    CandymanCID, here's somthing that reports column name. UPDATE: added more context, because original code wasn't clear.
    my @colNames; my $sth1 = $dbh->table_info(); while (my(@tab) = $sth1->fetchrow_array()) { push @colNames, $tab[2]; } open OUT, ">col.txt"; foreach $colName(@colNames) { print OUT "$colName\n"; my $sth = $dbh->column_info(); while (my @info = $sth->fetchrow_array()) { foreach (@info) {$_ = 'NULL' unless defined $_} if ($colName eq $info[2]) { print OUT "\t$info[3]\n";


    The DBI docs on CPAN are good, but dense. My example above should get you going...