[ic] How do I pull out the field-names from a query?

Mike Heins interchange-users@icdevgroup.org
Tue Jul 9 00:18:01 2002


Quoting Ren? Hertell (interchange-users@hertell.com):
> Hi folks,
> 
> Is there an easy way in getting the field-names from a sql-query? If yes,
> how should I do it? I'm using the last embedded perl-query example from the
> icfaq (http://icdevgroup.org/cgi-bin/ic/docfly.html?mv_arg=icfaq14%2e02),
> and when I tried $CGI->{my_fields}= join ",", $ref->columns(); (found in
> flex_select), my query didn't work at all..
> 

Examine the calling documentation better.

	($ary, $field_hash, $name_array) = $db->query($sql);

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

I have a cop friend who thinks he ought be able to give a new ticket;
"too dumb for conditions".