mssql_data_seekMoves internal row pointer
&warn.removed.function.7-0-0.alternatives;
Using an OFFSET clause with a query issued through
PDO_SQLSRV,
PDO_ODBC,
SQLSRV, or the
unified ODBC driver.
&reftitle.description;
boolmssql_data_seekresourceresult_identifierintrow_numbermssql_data_seek moves the internal row
pointer of the MS SQL result associated with the specified result
identifier to point to the specified row number, first row being
number 0. The next call to mssql_fetch_row
would return that row.
&reftitle.parameters;
result_identifier
The result resource that is being evaluated.
row_number
The desired row number of the new result pointer.
&reftitle.returnvalues;
&return.success;
&reftitle.examples;
mssql_data_seek example
= 13');
if (!$result) {
die('Query failed.');
}
// Select every 4th student in the results
for ($i = mssql_num_rows($result) - 1; $i % 4; $i++) {
if (!mssql_data_seek($result, $i)) {
continue;
}
// Fetch the row ...
}
// Free the query result
mssql_free_result($result);
?>
]]>