If you're using mysql try a 'DESCRIBE TABLE' query first.
If not mysql find a similar command in your database and use that first,
Once you have the name and position of the column names you can do what you want with
them
While associating them to the data in the subsequent select statement q
Thanks Dave
But i made the mistake of caling it a table but actually it is a view and table_info
ethod does not work for that. Also i tried to run table_info for a table but it does
not return the column names.
There is a column info method for tables to do this. But it does not work for views.
On Wed, 19 Feb 2003 08:15:27 -0500, Dave K wrote:
Hi Dave
>advice. If you would like to see another approach you can visit:
>http://www.geocities.com/k2001evad/pindex.html
Thanx for the demo.
--
Cheers
Ron Savage, [EMAIL PROTECTED] on 20/02/2003
http://savage.net.au/index.html
On Wed, 19 Feb 2003 09:13:48 +, [EMAIL PROTECTED]
wrote:
>
>Hi,
Hi Philip
>fetchrow_hashref returns a reference to a hash, with each hash
>having the
>column name as it's keys.
>
>$row = $sth->fetchrow_hashref;
>
>print "$row->{NAME},$row->{ADDRESS}"
Sure but there are other things to consid
Manisha
Hello
Hi
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
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
hashref
per result row and, again, an array containing the names of all your
columns.
Brian McCain
- Original Message -
From: "Manisha Gupta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 2:57 PM
Subject: retrieving column names from a ta
On Tue, 18 Feb 2003 17:57:12 -0500, Manisha Gupta wrote:
>Hello
Hi Manisha
I see you've been given 3 answers. I suggest reading DBI.html.
The data you want is clearly documented in DBI.html (generate this
from DBI.pm), under the heading 'Statement Handle Attributes'
--
Cheers
Ron Savage, [EMAIL P
57 PM
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
But the problem is I am not able to get the
-
From: Manisha Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 18, 2003 5: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
uot;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
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
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 nam
11 matches
Mail list logo