Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: display database records at the console

by samarzone (Pilgrim)
on Dec 30, 2010 at 15:32 UTC ( #879817=note: print w/replies, xml ) Need Help??


in reply to display database records at the console

Why bother? Just use mysql client with -e option

If you are desperate to do it in Perl just for displaying record on console you can use system or backticks (``) with mysql client and -e option as a shell command

Even if you want to do it through DBI you need not write a separate format for each query. You can loop over column names for header row. Column names can be found through $sth->{NAME} . I hope you very well know how to get the field values from the record-set returned.

--
Regards
- Samar

Replies are listed 'Best First'.
Re^2: display database records at the console
by Anonymous Monk on Dec 30, 2010 at 17:49 UTC
    thanks for both comments

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://879817]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2017-04-28 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (518 votes). Check out past polls.