Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 | 



cubrid_current_oid

Description

The cubrid_current_oid function gets the OID of the current cursor location from the query result. To use cubrid_current_oid(), the query executed must be an updatable query, and the CUBRID_INCLUDE_OID option must be included during the query execution.

Syntax

string cubrid_current_oid (resource $req_identifier)

  • req_identifier : Request identifier
Return Value
  • Success : OID of the current cursor position
  • Failure : FALSE
Example

<?php

$conn = cubrid_connect("localhost", 33000, "demodb");

 

$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:

 

Array

(

    [s_name] => X

    [f_name] => Mixed

)

See Also