in reply to How do you get Perl::DBI to do a desc table_name?
Here's how you can grab the datatype of the columns:my $names = $sth->{NAME}; #$names is an array reference for (@$names) { print $_, "\n"; }
The last example returns an array of integer values, the value indicates the datatype (see ANSI X3.135 for a description).my $types = $sth->{TYPE}; #$types is an array reference for (@$types) { print $_, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do you get Perl::DBI to do a desc table_name?
by lachoy (Parson) on Mar 28, 2002 at 13:23 UTC |