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
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 |
In Section
Seekers of Perl Wisdom