Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: List columns for a MySQL table

by dbwiz (Curate)
on Jun 29, 2006 at 13:04 UTC ( #558309=note: print w/replies, xml ) Need Help??


in reply to List columns for a MySQL table

If you want to get the columns from a MySQL table (not an arbitrary query), it's simpler, as shown in DBI Recipes, to use selectcol_arrayref combined with describe.

my $col_names = $dbh->selectcol_arrayref( qq{describe $table} );

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://558309]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2023-09-23 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?