php8.5
Home/ Manual/ cubrid / functions/ cubrid_current_oid

cubrid_current_oid

PHP function Edit on GitHub ✎

(PECL CUBRID >= 8.3.0)

Get OID of the current cursor location

Description

cubrid_current_oid(resource $req_identifier): string

The cubrid_current_oid() function is used to get the oid of the current cursor location from the query result. To use cubrid_current_oid(), the query executed must be a updatable query, and the CUBRID_INCLUDE_OID option must be included during the query execution.

Parameters

req_identifier

Request identifier.

Return Values

Oid of current cursor location, when process is successful,Falseforfailure.

Examples

cubrid_current_oid() example

php
<?php
$conn = cubrid_connect("localhost", 33000, "demodb", "dba");

$req = cubrid_execute($conn, "SELECT * FROM code", CUBRID_INCLUDE_OID);
$oid = cubrid_current_oid($req);
$res = cubrid_get($conn, $oid);

print_r($res);

cubrid_disconnect($conn);
?>

The above example will output:

output
Array
(
    [s_name] => X
    [f_name] => Mixed
)

See Also

Source: reference/cubrid/functions/cubrid-current-oid.xml · from the official PHP manual (php/doc-en)