Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: question about printing from database

by friedo (Prior)
on Feb 24, 2005 at 19:29 UTC ( [id://434208]=note: print w/replies, xml ) Need Help??


in reply to question about printing from database

With Class::DBI, you can fetch an entire table using the retrieve_all method. In scalar context, it will give you an iterator which basically does what the DBI "fetchrow_*" methods do. For example:

my $iterator = Class->retrieve_all; while(my $item = $iterator->next) { print $item->some_field, "\n"; }

Update: Added newline to print.

Replies are listed 'Best First'.
Re^2: question about printing from database
by Thargor (Scribe) on Feb 24, 2005 at 19:53 UTC
    Thanks a ton man that works so now all I need to do is in the while exectution set it up to print all of the fields in the columns in the table. once again Thanks

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-26 03:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found