(PHP 4, PHP 5)
cubrid_fetch_object — Returns an object with the column names
This function returns an object with the column names of the result set as properties. The values of these properties are extracted from the current row of the result.
This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute().
An object, when process is successful.
FALSE on failure.
Example #1 cubrid_fetch_object() example
<?php
$link = cubrid_connect("localhost", 30000, "demodb2", "dba", "");
if (!$link)
{
die('Could not connect.');
}
$query = 'SELECT name, address, salary FROM employees';
$result = cubrid_execute($link, $query);
if ($result)
{
$row = cubrid_fetch_object($result);
echo $row->name."<BR>";
echo $row->address."<BR>";
echo $row->salary;
cubrid_close_request($result);
}
?>
The above example will output:
Result: Peter 1st Avenue, New York 1000.0000000000000000