PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

cubrid_data_seek - Move the internal row pointer of the CUBRID result | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

cubrid_data_seek

(PECL CUBRID >= 8.3.0)

cubrid_data_seekMove the internal row pointer of the CUBRID result

説明

bool cubrid_data_seek ( resource $result , int $row_number )

This function performs the moving of the internal row pointer of the CUBRID result (associated with the specified result identifier) to point to a specific row number. There are functions, such as cubrid_fetch_assoc(), which use the current stored value of row number.

パラメータ

result

The result.

row_number

This is the desired row number of the new result pointer.

返り値

Returns TRUE on success or FALSE on failure.

例1 cubrid_data_seek() example

<?php
$conn 
cubrid_connect("127.0.0.1"33000"demodb");

$req cubrid_execute($conn"SELECT * FROM code");
cubrid_data_seek($req0);

$result cubrid_fetch_row($req);
var_dump($result);

cubrid_data_seek($req2);
$result cubrid_fetch_row($req);
var_dump($result);

cubrid_data_seek($req4);
$result cubrid_fetch_row($req);
var_dump($result);

cubrid_close_request($req);
cubrid_disconnect($conn);
?>

上の例の出力は以下となります。

array(2) {
  [0]=>
  string(1) "X"
  [1]=>
  string(5) "Mixed"
}
array(2) {
  [0]=>
  string(1) "M"
  [1]=>
  string(3) "Man"
}
array(2) {
  [0]=>
  string(1) "S"
  [1]=>
  string(6) "Silver"
}

忘却曲線を使ってこの関数を確実に記憶に残す

フォーラムで「cubrid_data_seek - Move the internal row pointer of the CUBRID result」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | cubrid_data_seek - Move the internal row pointer of the CUBRID result」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: