From b50f0baa6e2f5b6096fcbf8242344695002c5c16 Mon Sep 17 00:00:00 2001 From: Geoff Munn Date: Mon, 6 Apr 2009 05:30:15 +0000 Subject: [PATCH] seek() function created for sqlsrv --- code/MSSQLDatabase.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index 4132c35..d205ca1 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -1119,8 +1119,19 @@ class MSSQLQuery extends Query { } public function seek($row) { - $funcName=$this->funcPrefix . '_data_seek'; - return $funcName($this->handle, $row); + if($this->funcPrefix=='mssql') + return mssql_data_seek($this->handle, $row); + else { + $count=0; + while ($result=sqlsrv_fetch_array($this->handle)){ + if($count==$row) + break; + $count++; + } + + return $result; + + } } public function numRecords() {