mssql_connect
mssql_execute
Mssql 함수 목록
PHP Manual

# mssql_data_seek

(PHP 4, PHP 5, PECL odbtp >= 1.1.1)

mssql_data_seek — Moves internal row pointer

### 설명

bool mssql_data_seek ( resource `$result_identifier` , int `$row_number` )

mssql_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.

### 인수

`result_identifier`

  The result resource that is being evaluated.

`row_number`

  The desired row number of the new result pointer.

### 반환값

성공할 경우 `TRUE`를, 실패할 경우 `FALSE`를 반환합니다.

### 예제

Example #1 mssql_data_seek() example

`<?php
// Connect to MSSQL
$link = mssql_connect('MANGO\SQLEXPRESS', 'sa', 'phpfi');
mssql_select_db('php', $link);
// Select all people
$result = mssql_query('SELECT [name], [age] FROM [persons] WHERE [age] >= 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);
?>`

mssql_connect
mssql_execute
Mssql 함수 목록
PHP Manual