Cubrid Functions
PHP Manual

cubrid_field_table

(PHP 4, PHP 5)

cubrid_field_tableReturns the name of the table of the specified field

Description

string cubrid_field_table ( int $result , int $field_offset )

This function returns the name of the table of the specified field. This is useful when using large select queries with JOINS.

Parameters

result

This is the result handle that is evaluated. This result is obtained by a call to cubrid_execute().

field_offset

The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.

Return Values

Name of the table of the specified field, on success.

FALSE or -1 on failure.

Examples

Example #1 cubrid_field_table() example

<?php
    $link 
cubrid_connect("localhost"30000"demodb2""dba""");
    if (!
$link)
    {
        die(
'Could not connect.');
    }
    
$query 'SELECT id, name, address, salary FROM employees';
    
$result cubrid_execute($link$query);
    if (
$result
    {
        echo 
"Field 0 (<b>"cubrid_field_name($result0) . "</b>) is from table <i>" cubrid_field_table($result0) . "</i><br>";
        echo 
"Field 1 (<b>"cubrid_field_name($result1) . "</b>) is from table <i>" cubrid_field_table($result1) . "</i><br>";
        
        
cubrid_close_request($result); 
    }
?>

The above example will output:

Result:
Field 0 (id) is from table employees
Field 1 (name) is from table employees

Cubrid Functions
PHP Manual