Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: perl dbi - no column headings

by lachoy (Parson)
on Jul 09, 2003 at 16:34 UTC ( [id://272729]=note: print w/replies, xml ) Need Help??


in reply to perl dbi - no column headings

You need to grab the column names manually:

my $sth = $dbh->prepare($sql); $sth->execute() || die $sth->errstr; my $columns = $sth->{NAME}; print IN join( "\t", @{ $columns } ), "\n"; while ( my @row = $sth->fetchrow_array ) { print IN join("\t", @row), "\n"; }

Chris
M-x auto-bs-mode

Replies are listed 'Best First'.
Re: Re: perl dbi - no column headings
by cosmicsoup (Beadle) on Jul 09, 2003 at 18:40 UTC
    Chris,

    Your solution worked perfectly.

    Thanks,
    Louis

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://272729]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-25 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found