$rows.min, $rows.max

The $rows.min and $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, such that if $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. See also $sqlresult.... vars, which are more accurate.


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.