array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.cubrid-data-seek.php', 1 => 'cubrid_data_seek', 2 => 'Move the internal row pointer of the CUBRID result', ), 'up' => array ( 0 => 'cubridmysql.cubrid.php', 1 => 'CUBRID MySQL Compatibility Functions', ), 'prev' => array ( 0 => 'function.cubrid-close.php', 1 => 'cubrid_close', ), 'next' => array ( 0 => 'function.cubrid-db-name.php', 1 => 'cubrid_db_name', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/cubrid/cubridmysql/cubrid-data-seek.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

cubrid_data_seek

(PECL CUBRID >= 8.3.0)

cubrid_data_seekMove the internal row pointer of the CUBRID result

Açıklama

cubrid_data_seek(resource $result, int $row_number): bool

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 currently stored value of row number.

Bağımsız Değişkenler

result

The result.

row_number

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

Dönen Değerler

Returns true on success or false on failure.

Örnekler

Örnek 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($req, 0);

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

cubrid_data_seek($req, 2);
$result = cubrid_fetch_row($req);
var_dump($result);

cubrid_data_seek($req, 4);
$result = cubrid_fetch_row($req);
var_dump($result);

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

Yukarıdaki örneğin çıktısı:

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"
}