From 56be6ae056389e59bf91e12ac6cd4dc5932d2867 Mon Sep 17 00:00:00 2001 From: yitam Date: Tue, 4 Apr 2017 09:55:15 -0700 Subject: [PATCH] modify sqlsrv_fetch_cursor_static_scroll --- .../sqlsrv/sqlsrv_fetch_cursor_static_scroll.phpt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/sqlsrv/sqlsrv_fetch_cursor_static_scroll.phpt b/test/sqlsrv/sqlsrv_fetch_cursor_static_scroll.phpt index 8c28a24c..a8eb3ab8 100644 --- a/test/sqlsrv/sqlsrv_fetch_cursor_static_scroll.phpt +++ b/test/sqlsrv/sqlsrv_fetch_cursor_static_scroll.phpt @@ -42,6 +42,9 @@ function FetchRow_Query($conn) GetNextRow($stmt); GetRelativeRow($stmt, 5); GetAbsoluteRow($stmt, -1); + GetNextRow($stmt); + GetLastRow($stmt); + GetRelativeRow($stmt, 1); } function InsertData($conn, $tableName, $numRows) @@ -113,13 +116,6 @@ function GetAbsoluteRow($stmt, $offset) 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) { $rows = sqlsrv_has_rows( $stmt ); @@ -202,5 +198,10 @@ next row: 2, Row 2 row 5 from the current row: 7, Row 7 absolute row with offset -1: +next row: 1, Row 1 + +last row: 10, Row 10 + +row 1 from the current row: Done ...Test 'sqlsrv_fetch_cursor_static_scroll' completed successfully. \ No newline at end of file