Re: Urgent help needed! Trouble getting column names from tables

2007-06-27 Thread intel . g33k
On Jun 26, 10:25 am, [EMAIL PROTECTED] (Philip Garrett) wrote: [EMAIL PROTECTED] wrote: Good morning, I was given some tables on an Oracle database, but unfortunately I do not know the field/column names of the table. I've made numerous attempts to print such a list for a given table

Re: Urgent help needed! Trouble getting column names from tables

2007-06-27 Thread Ron Savage
Hi Folks There are Perl modules designed to solve this problem. One is: http://search.cpan.org/~rsavage/DBIx-Admin-TableInfo-2.00/ -- Ron Savage [EMAIL PROTECTED]

Urgent help needed! Trouble getting column names from tables

2007-06-26 Thread intel . g33k
Good morning, I was given some tables on an Oracle database, but unfortunately I do not know the field/column names of the table. I've made numerous attempts to print such a list for a given table, but they never seem to work. I've been trying SQL queries such as: SELECT column_name FROM

Re: Urgent help needed! Trouble getting column names from tables

2007-06-26 Thread Martin Evans
[EMAIL PROTECTED] wrote: Good morning, I was given some tables on an Oracle database, but unfortunately I do not know the field/column names of the table. I've made numerous attempts to print such a list for a given table, but they never seem to work. I've been trying SQL queries

Re: Urgent help needed! Trouble getting column names from tables

2007-06-26 Thread Hal Wigoda
i think there is a syscolumns and systables tables that contain that data. On Jun 26, 2007, at 7:31 AM, [EMAIL PROTECTED] wrote: Good morning, I was given some tables on an Oracle database, but unfortunately I do not know the field/column names of the table. I've made numerous attempts

RE: Urgent help needed! Trouble getting column names from tables

2007-06-26 Thread Garrett, Philip \(MAN-Corporate\)
[EMAIL PROTECTED] wrote: Good morning, I was given some tables on an Oracle database, but unfortunately I do not know the field/column names of the table. I've made numerous attempts to print such a list for a given table, but they never seem to work. I've been trying SQL queries

Re: Column names when using selectall_arrayref

2006-05-04 Thread David Kaufman
Hi Bill, Bill Moseley [EMAIL PROTECTED] wrote: How do I get the column names as a list to match the order of the rows returned when using select/fetchall_arrayref [...] I'm not having luck finding it in the docs. See the Statement Handle Attributes section of the DBI docs: http

Column names when using selectall_arrayref

2006-05-03 Thread Bill Moseley
How do I get the column names as a list to match the order of the rows returned when using select/fetchall_arrayref and using an ARRAY slice? I'm not having luck finding it in the docs. I don't know the column names ahead of time -- I'm passed a query and want to return the data in the column

Re: Column names when using selectall_arrayref

2006-05-03 Thread Jonathan Leffler
On 5/3/06, Bill Moseley [EMAIL PROTECTED] wrote: How do I get the column names as a list to match the order of the rows returned when using select/fetchall_arrayref and using an ARRAY slice? I'm not having luck finding it in the docs. I don't know the column names ahead of time -- I'm passed

Re: Column names have spaces in them!!!

2006-02-02 Thread Robert Hicks
Alexander Foken wrote: snip You could slowly migrate your system, a first step would be to make sure all table and column names match /^[A-Za-z][A-Za-z0-9_]+$/. Next, move the tables and the business logic to a real database. Then finally, get rid of ODBC drivers and Access on the clients

Re: Column names have spaces in them!!!

2006-02-01 Thread Alexander Foken
don't have an Oracle License, you could also use the free (as in beer) MSDE, or the free (as in beer and speech) PostgreSQL. You could slowly migrate your system, a first step would be to make sure all table and column names match /^[A-Za-z][A-Za-z0-9_]+$/. Next, move the tables

Re: Column names have spaces in them!!!

2006-02-01 Thread Darren Duncan
At 9:44 AM +0100 2/1/06, Alexander Foken wrote: You could slowly migrate your system, a first step would be to make sure all table and column names match /^[A-Za-z][A-Za-z0-9_]+$/. Next, move the tables and the business logic to a real database. Then finally, get rid of ODBC drivers and Access

Re: Column names have spaces in them!!!

2006-02-01 Thread Alexander Foken
Darren Duncan wrote: At 9:44 AM +0100 2/1/06, Alexander Foken wrote: You could slowly migrate your system, a first step would be to make sure all table and column names match /^[A-Za-z][A-Za-z0-9_]+$/. Next, move the tables and the business logic to a real database. Then finally, get rid

Re: Re: Column names have spaces in them!!!

2006-02-01 Thread Tim Bunce
On Wed, Feb 01, 2006 at 02:08:32AM +0100, [EMAIL PROTECTED] wrote: use backticks instead of double quotes: my $sth=$dbh-prepare('select * from taskhours_per_date where `employee name`=?'); That's not portable. The DBI has a $dbh-quote_identifier method to abstract this and

Re: Column names have spaces in them!!!

2006-02-01 Thread Ron Savage
On Wed, 01 Feb 2006 13:36:41 +0100, Alexander Foken wrote: Hi Alexander Right. But using a restrictive set of characters for table and column names makes things easier. The column for the number of Just as I raved about back in 2003 :-): http://savage.net.au/Ron/html/naming-database

Re: Column names have spaces in them!!!

2006-02-01 Thread Darren Duncan
At 9:30 AM +1100 2/2/06, Ron Savage wrote: On Wed, 01 Feb 2006 13:36:41 +0100, Alexander Foken wrote: Right. But using a restrictive set of characters for table and column names makes things easier. The column for the number of Just as I raved about back in 2003 :-): Now, I understand

Re: Column names have spaces in them!!!

2006-02-01 Thread Ron Savage
On Wed, 1 Feb 2006 15:46:31 -0800, Darren Duncan wrote: Hi Darren snip valid points It would be quite natural for such users to make identifiers like 'Person' and 'Home Address' and 'Home Telephone' and 'Work Telephone' and so on; it isn't natural for them to say 'Home_Telephone' and such.

Column names have spaces in them!!!

2006-01-31 Thread Robert Hicks
I am using the ODBC module to talk to an Access database. In that database some of the column names have spaces in them (something like EMPLOYEE NAME). I have tried a bunch of stuff (backticking, brackets, braces, variables) but I cannot seem to do a select on that table. my $sth = $dbh

Re: Column names have spaces in them!!!

2006-01-31 Thread paul . boutros
I believe you want square-brackets for Access: my $sth = $dbh-prepare(SELECT * FROM taskhours_per_date WHERE [EMPLOYEE NAME] = ?); Paul Quoting Robert Hicks [EMAIL PROTECTED]: I am using the ODBC module to talk to an Access database. In that database some of the column names have spaces

Re: Column names have spaces in them!!!

2006-01-31 Thread Alexander Foken
old Access versions have some very strange behaviours. Alexander Robert Hicks wrote: I am using the ODBC module to talk to an Access database. In that database some of the column names have spaces in them (something like EMPLOYEE NAME). I have tried a bunch of stuff (backticking, brackets

Re: Column names have spaces in them!!!

2006-01-31 Thread John Scoles
Subject: Column names have spaces in them!!! I am using the ODBC module to talk to an Access database. In that database some of the column names have spaces in them (something like EMPLOYEE NAME). I have tried a bunch of stuff (backticking, brackets, braces, variables) but I cannot seem

Re: Column names have spaces in them!!!

2006-01-31 Thread Robert Hicks
Alexander Foken wrote: You need to pass the quotes to the SQL engine. And by the way, you should either use parameters or the quote function for values: my $sth=$dbh-prepare('select * from taskhours_per_date where employee name=?'); $sth-execute('NAME HERE'); Maybe MS Acesss has other ways

Re: Re: Column names have spaces in them!!!

2006-01-31 Thread perl
use backticks instead of double quotes: my $sth=$dbh-prepare('select * from taskhours_per_date where `employee name`=?'); Regards, Renee Am 31.01.2006 um 23:58 Uhr haben Sie geschrieben: Alexander Foken wrote: You need to pass the quotes to the SQL engine. And by the way, you should

AW: need help to know the column names and data types

2005-10-02 Thread Renee Backer
. September 2005 13:36 An: dbi-users@perl.org Betreff: need help to know the column names and data types Hi I am new to DBI programming. I am trying to write a generic package which will handle all the database operations like create table, insert records, delete and also modify records

need help to know the column names and data types

2005-09-30 Thread Umesh Barik
Hi I am new to DBI programming. I am trying to write a generic package which will handle all the database operations like create table, insert records, delete and also modify records. For a query user need to enter the table name only and the package will get the column names, data types

RE: need help to know the column names and data types

2005-09-30 Thread Ian Harisay
to know the column names and data types Hi I am new to DBI programming. I am trying to write a generic package which will handle all the database operations like create table, insert records, delete and also modify records. For a query user need to enter the table name only and the package

Re: need help to know the column names and data types

2005-09-30 Thread Ron Savage
On Fri, 30 Sep 2005 17:05:35 +0530, Umesh Barik wrote: Hi Umesh 1) http://charlotte.pm.org/kwiki/index.cgi?BreadProject 2) http://search.cpan.org/ and search for CGI::Application or DBIx::Admin 3) (Old code) http://savage.net.au/Perl-tutorials.html (# 35 or 41) -- Cheers Ron Savage, [EMAIL

binding column names

2004-07-06 Thread Guenter . Buehrle
Hi everybody, what I want to do is something like $dbh-prepare('UPDATE table SET ? = ? WHERE id=?'); $dbh-execute($column,$value, $id); The encountered problem relates to the bind-process of $column. As I suppose I have to explicitly call the bind_param-method the tell the driver not to quote

Re: binding column names

2004-07-06 Thread Michael Peppler
On Tue, 2004-07-06 at 08:33, [EMAIL PROTECTED] wrote: Hi everybody, what I want to do is something like $dbh-prepare('UPDATE table SET ? = ? WHERE id=?'); $dbh-execute($column,$value, $id); The encountered problem relates to the bind-process of $column. As I suppose I have to

Re: binding column names

2004-07-06 Thread Tony . Adolph
] cc: 06.07.2004 08:33 Subject: binding column names

Re: Better way to get column names with values?

2003-09-23 Thread Bart Lateur
On Tue, 23 Sep 2003 09:37:42 +1000, Fox, Michael wrote: If you are not worried about the order in which the columns come back, you could select straight into a hash and save a few lines of code Or blend the two aproaches, use $sth-{NAME} to get an array of names in the proper order, and use a

Better way to get column names with values?

2003-09-22 Thread JoeJoeJoeJoe
Hey, Basically trying to get 1 set of results returned, along with all column names at the same time. Is there an easier way to do it than this? Here's what I have: (Note: MySQL database) my $tablename = tablename; #get around taint warning $sql = LISTFIELDS $tablename; $sth = $dbh-prepare

Re: Better way to get column names with values?

2003-09-22 Thread Michael A Chase
On Mon, 22 Sep 2003 07:23:17 +0200 JoeJoeJoeJoe [EMAIL PROTECTED] wrote: Basically trying to get 1 set of results returned, along with all column names at the same time. Is there an easier way to do it than this? Here's what I have: There is, see below. (Note: MySQL database) my

RE: Better way to get column names with values?

2003-09-22 Thread Fox, Michael
) { print $col_name is $r_results-{$col_name}br; } -Original Message- From: JoeJoeJoeJoe [mailto:[EMAIL PROTECTED] Sent: Monday, 22 September 2003 3:23 PM To: [EMAIL PROTECTED] Subject: Better way to get column names with values? Hey, Basically trying to get 1 set of results returned

RE: How can I fetch column names?

2003-06-11 Thread Herbold, John W.
Nickolayev Cc: [EMAIL PROTECTED] Sent: 6/10/2003 10:37 PM Subject: Re: How can I fetch column names? Try this (I use mysql - thus your mileage can vary): $column_list = $connect-prepare(LISTFIELDS $oppanel_table) ; $column_list-execute() ; $column_list_numrows = $column_list

Re: How can I fetch column names?

2003-06-11 Thread Tim Bunce
for informix. You mileage will vary. # This function queries the database about a table. Returns three values: # 1) The strings that represent how to reconstruct the # table. IE: biblio_id CHAR(7), # 2) The number of columns in the table. # 3) The array of column names. sub

How can I fetch column names?

2003-06-10 Thread Anthony Nickolayev
Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need to fetch just list, contains column names - and i dont know how to do it. I didnt find it in DBI manual page, and anywhere else. Thanks anyway, and sorry for my english.

Re: How can I fetch column names?

2003-06-10 Thread Paul Boutros
(keys(%$ref)) { print $key\t$$ref{$key}\n; } } Does that help? Paul Quoting Anthony Nickolayev [EMAIL PROTECTED]: Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need to fetch just list, contains column

RE: How can I fetch column names?

2003-06-10 Thread Jones Robert Contr TTMS Keesler
::errstr\n; -Original Message- From: Anthony Nickolayev [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 3:34 AM To: [EMAIL PROTECTED] Subject: How can I fetch column names? Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need

Re: How can I fetch column names?

2003-06-10 Thread Hardy Merrill
question will be RTFM, but i still cant find it myself. The problem is: i need to fetch just list, contains column names - and i dont know how to do it. I didnt find it in DBI manual page, and anywhere else. Thanks anyway, and sorry for my english.

Re: How can I fetch column names?

2003-06-10 Thread David N Murray
Which database? It usually varies. On Jun 10, Anthony Nickolayev scribed: Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need to fetch just list, contains column names - and i dont know how to do it. I didnt find it in DBI manual

RE: How can I fetch column names?

2003-06-10 Thread Igor Korolev
, June 10, 2003 4:30 PM To: Anthony Nickolayev Cc: [EMAIL PROTECTED] Subject: Re: How can I fetch column names? Which database? It usually varies. On Jun 10, Anthony Nickolayev scribed: Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i

Re: How can I fetch column names?

2003-06-10 Thread Henri Asseily
Nickolayev Cc: [EMAIL PROTECTED] Subject: Re: How can I fetch column names? Which database? It usually varies. On Jun 10, Anthony Nickolayev scribed: Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need to fetch just list, contains

Re: How can I fetch column names?

2003-06-10 Thread Vinnie Lima
: @rwl.buryatia.ru Subject: How can I fetch column names

Re: DBD::CSV--Execution ERROR: Couldn't find column names!.

2003-03-03 Thread Jeff Zucker
Snethen, Jeff wrote: I've worked with the DBI some, but I'm now starting to experiment with DBD::CSV. I'm trying to read a table without column headers, letting CSV create the column names for me. If I understand the documentation correctly, an empty array reference should cause the driver

DBD::CSV--Execution ERROR: Couldn't find column names!.

2003-02-26 Thread Snethen, Jeff
I've worked with the DBI some, but I'm now starting to experiment with DBD::CSV. I'm trying to read a table without column headers, letting CSV create the column names for me. If I understand the documentation correctly, an empty array reference should cause the driver to name the columns

RE: retrieving column names from a table using DBI module

2003-02-21 Thread Dan Muey
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

Re: retrieving column names from a table using DBI module

2003-02-20 Thread Ms manisha gupta
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

Re: retrieving column names from a table using DBI module

2003-02-19 Thread Ron Savage
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

Re: retrieving column names from a table using DBI module

2003-02-19 Thread Philip . Meadway
are not as efficient as the array ref functions, so, if performance is an issue, it may be worth performing a select from the database system tables to determine column names (and types?) before using the arrayref functions. There is a table_info function that will give you the table definitions

Re: retrieving column names from a table using DBI module

2003-02-19 Thread Dave K
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 tablename But the problem is I am not able to get the column names. I am using the DBI module

Re: retrieving column names from a table using DBI module

2003-02-19 Thread Ron Savage
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 consider: 1)

Re: retrieving column names from a table using DBI module

2003-02-19 Thread Ron Savage
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

retrieving column names from a table using DBI module

2003-02-18 Thread Manisha Gupta
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

RE: retrieving column names from a table using DBI module

2003-02-18 Thread Helck, Timothy
]] 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 on the web page. the query is something like

Re: retrieving column names from a table using DBI module

2003-02-18 Thread Brian McCain
to an array containing one 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 table

Column Names for Oracle Cursor

2002-11-04 Thread Georg Botorog
Hi, Is there a way to get the column names for a cursor call instead of :B1, :B2, etc? Thanks, G. Botorog

Re: Column Names for Oracle Cursor

2002-11-04 Thread Michael A Chase
On Mon, 4 Nov 2002 19:08:27 +0100 Georg Botorog [EMAIL PROTECTED] wrote: Is there a way to get the column names for a cursor call instead of :B1, :B2, etc? Those names are usually associated with bind variables, not columns. Some example code might make it easier for someone here to figure out

Fetching Column Names and Data Types

2002-10-11 Thread Chuck Tomasi
Can someone give me a sample of how to use the column_info method in DBI 1.30? I've read the docs, and I believe this method has the information I seek, but I'm an examples kind of person when it comes to stuff like this. I'm primarily interested in getting my hands on the column names and data

getting column names with reply

2002-09-09 Thread Kyle
Hello How can I get SQL to return the column names when doing a select using the DBI? Why do I need this? I am trying to make one sub that will do my various selects. Right now I'm doing it with discrete subs. I find that these subs are EXACTLY the same except for parsing the SQL returns

Re: getting column names with reply

2002-09-09 Thread Ronald J Kimball
On Mon, Sep 09, 2002 at 05:03:48PM -0400, Kyle wrote: Hello How can I get SQL to return the column names when doing a select using the DBI? Why do I need this? I am trying to make one sub that will do my various selects. Right now I'm doing it with discrete subs. I find

RE: getting column names with reply

2002-09-09 Thread Steve Sapovits
Check out the NAME and NAME_uc attributes associated with the statement handle. They essentially give you a hash of column names. Steve Sapovits [EMAIL PROTECTED] -Original Message- From: Kyle [SMTP:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 5:04 PM To: PERL DBI

retrieve column names in the result set

2002-04-05 Thread Zhao, David [PRDUS Non JJ]
Hi there, How can I retrieve the column names in the result set using DBI? Thanks, David

Re: retrieve column names in the result set

2002-04-05 Thread Michael A Chase
From: Zhao, David [PRDUS Non JJ] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 04, 2002 17:26 Subject: retrieve column names in the result set How can I retrieve the column names in the result set using DBI? It's in the fine manual. Run 'perldoc DBI' and look for the NAME

Column names and etc..

2002-01-11 Thread Marius Keraitis
Hi, I have a problem with getting colunm count and their names. I have to get the list of all tables in the users account (Oracle). This I do by selecting * from cat. Second step is to show every table contents (by clicking on link with table name). To do this I need to know how many columns

RE: Column names and etc..

2002-01-11 Thread Siiskonen, Pekka
all_tab_columns order by OWNER, TABLE_NAME, COLUMN_ID = Pekka Siiskonen -Original Message- From: Marius Keraitis [mailto:[EMAIL PROTECTED]] Sent: 11. tammikuuta 2002 12:40 To: DBI Perl; Begginers Perl Subject: Column names and etc

Re: Column names and etc..

2002-01-11 Thread Bart Lateur
[beginners list snipped] On Fri, 11 Jan 2002 11:40:03 +0100, Marius Keraitis wrote: Second step is to show every table contents (by clicking on link with table name). To do this I need to know how many columns is in table, and all names of columns in table. You can do (very portable):

Re: Column names and etc..

2002-01-11 Thread Terrence Brannon
On Friday, January 11, 2002, at 07:09 AM, Bart Lateur wrote: [beginners list snipped] On Fri, 11 Jan 2002 11:40:03 +0100, Marius Keraitis wrote: Second step is to show every table contents (by clicking on link with table name). To do this I need to know how many columns is in table,

Re: Column names and etc..

2002-01-11 Thread eingb
On 11 Jan 2002, at 9:07, Terrence Brannon wrote: On Friday, January 11, 2002, at 07:09 AM, Bart Lateur wrote: [beginners list snipped] On Fri, 11 Jan 2002 11:40:03 +0100, Marius Keraitis wrote: Second step is to show every table contents (by clicking on link with table name). To

Re: Column Names

2001-11-02 Thread Bart Lateur
On Thu, 01 Nov 2001 18:56:18 -0800, Venkataramana Mokkapati wrote: How do I get column names and order of column names for a select * from ... query. If you have $sth = $dbh-prepare(select * from ...); then try @column_names = @{$sth-{NAME}}; You may have to do an execute

Re: Column Names

2001-11-02 Thread Scott R. Godin
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Bart Lateur) wrote: On Thu, 01 Nov 2001 18:56:18 -0800, Venkataramana Mokkapati wrote: How do I get column names and order of column names for a select * from ... query. If you have $sth = $dbh-prepare(select * from

Re: Column Names

2001-11-02 Thread Bart Lateur
On Fri, 02 Nov 2001 07:27:49 -0500, Scott R. Godin wrote: my %db; $sth-bind_columns( \( @db{ @{ $sth-{NAME} } } ));# magic while ($sth-fetch) { #... and no worries about which order the columns get returned in #... since you access them via the $db{ColumnName}

Re: Column Names

2001-11-02 Thread Michael Peppler
Scott R. Godin writes: the absolute neatest trick I've seen with this, that is so totally perlish it defies description.. you stare at it for a bit and suddenly all becomes clear. $sth-execute or die(Cannot Execute SQL Statement: , $sth-errstr(), \n);

Re: Column Names

2001-11-02 Thread Tim Bunce
On Fri, Nov 02, 2001 at 02:18:15PM +0100, Bart Lateur wrote: On Fri, 02 Nov 2001 07:27:49 -0500, Scott R. Godin wrote: my %db; $sth-bind_columns( \( @db{ @{ $sth-{NAME} } } ));# magic while ($sth-fetch) { #... and no worries about which order the columns get

Re: Column Names

2001-11-02 Thread Scott R. Godin
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Tim Bunce) wrote: On Fri, Nov 02, 2001 at 02:18:15PM +0100, Bart Lateur wrote: On Fri, 02 Nov 2001 07:27:49 -0500, Scott R. Godin wrote: my %db; $sth-bind_columns( \( @db{ @{ $sth-{NAME} } } ));# magic while

Re: Column Names

2001-11-02 Thread Scott R. Godin
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Michael Peppler) wrote: my $rows = $sth-rows; # only expecting one row for a unique ID . this should NEVER happen. safe_error(invalid number of rows returned from database ($rows) for ID $id) if $rows 1; #

Re: Column Names

2001-11-02 Thread Tim Bunce
On Fri, Nov 02, 2001 at 02:41:05PM -0500, Scott R. Godin wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Tim Bunce) wrote: On Fri, Nov 02, 2001 at 02:18:15PM +0100, Bart Lateur wrote: On Fri, 02 Nov 2001 07:27:49 -0500, Scott R. Godin wrote: my %db;

RE: Column Names

2001-11-02 Thread Steve Howard
of bind_columns instead of fetchrow_hashref, and the ability to access the columns by name, and it keeps all the columns in order for the use in execute or print or whatever else might be useful. I find it very slick when I need column names. Steve H. -Original Message- From: Scott R

Column Names

2001-11-01 Thread Venkataramana Mokkapati
May be a simple Q... How do I get column names and order of column names for a select * from ... query. I dont want to use selecthash_ref just for column names. Thanks in advance, --MVRamana _ Get your FREE download of MSN

Fetching Column Names

2001-05-08 Thread Sean Carte
Is it possible to fetch the names of all columns in a table? How about all tables in a database? -- My brain hurts! SeanC Mediatek Training Institute 26 Crart Ave., Berea, Durban, South Africa phone: +27 (0)31 202 1886 [EMAIL PROTECTED]

RE: Fetching Column Names

2001-05-08 Thread Gregory_Griffiths
You can do a DESC command in SQL, although most interfaces also provide a specific way of doing this. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 08 May 2001 10:45 To: [EMAIL PROTECTED] Subject: Fetching Column Names Is it possible to fetch

Re: Fetching Column Names

2001-05-08 Thread Philip Newton
On 8 May 2001, at 11:45, Sean Carte wrote: Is it possible to fetch the names of all columns in a table? First, prepare a statement that will select all columns from that table: $sth = $dbh-prepare('select * from blurfle'); Next, you may have to execute the handle. (Whether this is

RE: Fetching Column Names

2001-05-08 Thread Sean Carte
Many thanks your helpful replies Gregory, Sikkandar, and Philip! -- SeanC