modify sqlsrv_fetch_cursor_static_scroll
This commit is contained in:
parent
6303abce69
commit
56be6ae056
|
@ -42,6 +42,9 @@ function FetchRow_Query($conn)
|
||||||
GetNextRow($stmt);
|
GetNextRow($stmt);
|
||||||
GetRelativeRow($stmt, 5);
|
GetRelativeRow($stmt, 5);
|
||||||
GetAbsoluteRow($stmt, -1);
|
GetAbsoluteRow($stmt, -1);
|
||||||
|
GetNextRow($stmt);
|
||||||
|
GetLastRow($stmt);
|
||||||
|
GetRelativeRow($stmt, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function InsertData($conn, $tableName, $numRows)
|
function InsertData($conn, $tableName, $numRows)
|
||||||
|
@ -113,13 +116,6 @@ function GetAbsoluteRow($stmt, $offset)
|
||||||
echo $obj->c1_int . ", " . $obj->c2_varchar . "\n";
|
echo $obj->c1_int . ", " . $obj->c2_varchar . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function DisplayRow($stmt)
|
|
||||||
{
|
|
||||||
$field1 = sqlsrv_get_field( $stmt, 0 );
|
|
||||||
$field2 = sqlsrv_get_field( $stmt, 1 );
|
|
||||||
echo "$field1, $field2\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
function HasRows($stmt)
|
function HasRows($stmt)
|
||||||
{
|
{
|
||||||
$rows = sqlsrv_has_rows( $stmt );
|
$rows = sqlsrv_has_rows( $stmt );
|
||||||
|
@ -202,5 +198,10 @@ next row: 2, Row 2
|
||||||
row 5 from the current row: 7, Row 7
|
row 5 from the current row: 7, Row 7
|
||||||
|
|
||||||
absolute row with offset -1:
|
absolute row with offset -1:
|
||||||
|
next row: 1, Row 1
|
||||||
|
|
||||||
|
last row: 10, Row 10
|
||||||
|
|
||||||
|
row 1 from the current row:
|
||||||
Done
|
Done
|
||||||
...Test 'sqlsrv_fetch_cursor_static_scroll' completed successfully.
|
...Test 'sqlsrv_fetch_cursor_static_scroll' completed successfully.
|
Loading…
Reference in a new issue