See the DBI documentation it's something like fetch_rowhash.
Or what I've done before is a describe query that assigned the column name to a number
( for reference later )
Then when You do select * ...
@row = fetch_rowarray ...
my $i;
foreach $item(@row) {
print "Column Name - $columnhash[$n] : Column Value = $item \n";
$i++;
}
Soemthing like that anyway
Dan
> -----Original Message-----
> From: Manisha Gupta [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 18, 2003 4:57 PM
> To: [EMAIL PROTECTED]
> Subject: retrieving column names from a table using DBI module
>
>
> Hello
> I am working with Perl CGi. There is a query where i have to
> select all columns in a table and display the data on the
> web page. the query is something like
> "select * from <tablename>
> But the problem is I am not able to get the column names.
> I am using the DBI module. Is there a way to get column names?
>
> Thanks
>