SYNOPSISint n_flushtx2(se,tx,nrows,max);
SERVER *se;
TX *tx;
int nrows;
int max;
DESCRIPTION
This function flushes up to nrows results from the specified SQL
statement. This is useful for skipping a number of records from
a SELECT
. The max is an suggestion to the SQL engine of how many
records you intend to read.
The return will be the number of records actually flushed if successful, or if an error occurred then the return will be a negative number of (-1 - rowsflushed). Reaching the end of the results is not considered an error, and will result in a return less than nrows.
EXAMPLESERVER *se;
...
/* setup query */
if(n_settx(se,tx,
"select name from customer where lastorder<'1990-01-01';"
)!=TXPN)
n_flushtx2(se,tx,10,10); /* ignore first 10 results */
...