$rows.max variables are set at every
iteration, and at the end, of a
<SQL> loop. They are the minimum
and maximum total rows that will be returned by the SQL query.
In cases where the exact number of result rows is not yet known (e.g.
post-processing is required), the two will differ. If the upper or
lower limit is not known (e.g. a completely unindexed query), one or
both variables will be negative. If both variables are equal, the
total row count is exact.
A one-row look-ahead feature is enabled with
$rows.min is greater than
$next (either in the
loop or after), at least one more row exists in the result set.
See here for more on these variables.
$sqlresult.$...$ vars, which are more accurate.