For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > April 2005 > Retrieving table information from postgreSQL DB









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Retrieving table information from postgreSQL DB
sonya

2005-04-19, 10:26 am

Hello,
I'm trying to retrieve the names of the fields in a psql DB table in my cgi program. When approaching the DB directly, the command is: \d table_name.
However when in my program I write:
my $output = $dbh->selectall_arrayref("\d tissue")
or
my $output = $dbh->selectall_arrayref("\\d tissue")
the query is not being executed.
Is there another way?
Perhaps, when executing a SELECT query, there is a way to receive the "header" with the field names as well?

Thank you very much in advance,
Sonya
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com