array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.cubrid-get-class-name.php', 1 => 'cubrid_get_class_name', 2 => 'Get the class name using OID', ), 'up' => array ( 0 => 'ref.cubrid.php', 1 => 'CUBRID 函数', ), 'prev' => array ( 0 => 'function.cubrid-get-charset.php', 1 => 'cubrid_get_charset', ), 'next' => array ( 0 => 'function.cubrid-get-client-info.php', 1 => 'cubrid_get_client_info', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/cubrid/functions/cubrid-get-class-name.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

cubrid_get_class_name

(PECL CUBRID >= 8.3.0)

cubrid_get_class_nameGet the class name using OID

说明

cubrid_get_class_name(resource $conn_identifier, string $oid): string

The cubrid_get_class_name() function is used to get the class name from oid. It doesn't work when selecting data from the system tables, for example db_class.

参数

conn_identifier

Connection identifier.

oid

OID of the instance that you want to check the existence.

返回值

Class name when process is successful, 或者在失败时返回 false.

示例

示例 #1 cubrid_get_class_name() example

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

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

print_r($class_name);

cubrid_disconnect($conn);
?>

以上示例会输出:

code

参见