On Fri, Oct 18, 2002 at 08:50:48PM +0200, Gerald Richter wrote:
 
> > 3. Is it possible to get count of total records returned when using
> > PrevNextForm with $max
> >
> 
> Set $DBIx::Recordset::FetchsizeWarn = 0 and you will get the total number of
> records with scalar(@set), if your database supports this (i.e. returns the
> number when doing the search)

I'm not using *set as a glob but via "$set = DBIx::Recordset->Search";
scalar(@$set) returns the $max not the total records.
Looking at mysql.log, DBIx::Recordset is using LIMIT 0, $max.

Also, I tried using MoreRecords().
The docs say it does not change the current record, but looks like it
does. The first record is gone. All I'm doing is:

[- $set = DBIx::Recordset->Search($h); -]
[$ if $set && $$set->MoreRecords() $]
[$ while ( my $rec = $$set->Next() ) $]
[# do stuff with $rec #]
[$ endwhile $]
[$ endif $]

First record is skipped.

When I remove the $$set->MoreRecords(), the first record shows up and
all is good.

ilia.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to