On Thu, Jun 14, 2001 at 03:16:05PM -0700, traja wrote:
> How do I get the headers (column names) when I do a select thro' DBI.
> fetchrow will fetch only the data. I need to display the headers as
> well.

>From the DBI perldocs:

       NAME  (array-ref, read-only)
           Returns a reference to an array of field names for
           each column. The names may contain spaces but should
           not be truncated or have any trailing space. Note that
           the names have the letter case (upper, lower or mixed)
           as returned by the driver being used. Portable
           applications should use the NAME_lc entry elsewhere in
           this documentor the NAME_uc entry elsewhere in this
           document.

             print "First column name: $sth->{NAME}->[0]\n";
--
Andy <[EMAIL PROTECTED]>

Reply via email to