Cubrid Functions
PHP Manual

cubrid_get

(PHP 4, PHP 5)

cubrid_getIs used to get the attribute

Description

mixed cubrid_get ( int $conn_handle , string $oid [, mixed $attr ] )

The cubrid_get() function is used to get the attribute of the instance of the given oid. You can get single attribute by using string data type for the attr argument, or many attributes by using array data type for the attr argument.

Parameters

conn_handle

Connection handle.

oid

Oid of the instance that you want to read.

attr

Name of the attribute that you want to read.

Return Values

Content of the requested attribute, when process is successful;

FALSE when process is unsuccessful (If error occurs to distinguish empty string from NULL, then it prints the warning message. You can check the error by using cubrid_error_code())

When attr is set with string data type, the result is returned as a string; when attr is set with array data type (0-based numerical array), then the result is returned in associative array. When attr is omitted, then all attributes are received in array form.

Examples

Example #1 cubrid_get() example

<?php
$attrarray 
cubrid_get ($con$oid);
echo 
$attrarray["id"];
echo 
$attrarray["name"];
?>

See Also


Cubrid Functions
PHP Manual