mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
seek() function created for sqlsrv
This commit is contained in:
parent
a8650e3366
commit
b50f0baa6e
@ -1119,8 +1119,19 @@ class MSSQLQuery extends Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function seek($row) {
|
public function seek($row) {
|
||||||
$funcName=$this->funcPrefix . '_data_seek';
|
if($this->funcPrefix=='mssql')
|
||||||
return $funcName($this->handle, $row);
|
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() {
|
public function numRecords() {
|
||||||
|
Loading…
Reference in New Issue
Block a user