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