Look at the statement handle attributes "NAME", "NAME_uc", and
"NAME_lc".
HTH.
--
Hardy Merrill
Senior Software Engineer
Red Hat, Inc.
Ian Harisay [[EMAIL PROTECTED]] wrote:
> Hi,
> Does anyone know how to generate column headers for output based on the SQL.
> my $sth = $dbh->prepare("SELECT field1, field2 FROM table1");
> $sth->execute;
>
> print $headers ## how would I do this based on the fields returned??
>
> while ( my $rec = $sth->fetchrow_arrayref ){
> print join(", ", @{ $rec } ), $/;
> }
>
> Thanks,
>
> Ian