cubrid_data_seek

(PECL CUBRID >= 8.3.0)

cubrid_data_seekMove the internal row pointer of the CUBRID result

说明

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

范例

Example #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"
}
相关文章
php cubrid mysql 兼容性函数 return the number of rows affected by the last sql statementphp cubrid mysql 兼容性函数 move the internal row pointer of the cubrid resultphp cubrid mysql 兼容性函数 fetch a result row as an associative array a numeric array or bothphp cubrid mysql 兼容性函数 return the associative array that corresponds to the fetched rowphp cubrid mysql 兼容性函数 get column information from a result and return as an objectphp cubrid mysql 兼容性函数 return an array with the lengths of the values of each field from the current rowphp cubrid mysql 兼容性函数 fetch the next row and return it as an objectphp cubrid mysql 兼容性函数 return a numerical array with the values of the current rowphp cubrid mysql 兼容性函数 get the maximum length of the specified fieldphp cubrid mysql 兼容性函数 return the name of the specified field indexphp cubrid mysql 兼容性函数 move the result set cursor to the specified field offsetphp cubrid mysql 兼容性函数 return an array with the list of all existing cubrid databasesphp cubrid mysql 兼容性函数 return the number of columns in the result setphp cubrid mysql 兼容性函数 send a cubrid queryphp cubrid mysql 兼容性函数 return the value of a specific field in a specific rowphp cubrid mysql 兼容性函数 perform a query without fetching the results into memoryphp frontbase 函数 move internal result pointerphp frontbase 函数 move the internal result pointer to the next resultphp msql 函数 move internal row pointerphp mssql 函数 move the internal result pointer to the next result
关注编程学问公众号