MySQL Forums
Forum List  »  Perl

Re: getting column names
Posted by: Felix Geerinckx
Date: March 28, 2006 01:52AM

Mario Sanchez wrote:

> upon passing a sql to dbi assume that i do not know in advance what columns will be returned.
> is there a way to find out what columns were returned by name?

Check out fetchrow_hashref().

Having said that, it is not good practice to use

SELECT * FROM ...

in production code (unless you are writing yet another MySQL administration front-end of course).

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
March 27, 2006 04:15PM
Re: getting column names
March 28, 2006 01:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.