Cubrid Functions
PHP Manual

cubrid_field_seek

(PECL CUBRID >= 8.3.0)

cubrid_field_seekMoves the result set cursor to the specified field offset

Description

bool cubrid_field_seek ( resource $req_identifier , int $field_offset )

This function moves the result set cursor to the specified field offset. This offset is used by cubrid_fetch_field() if it doesn't include a field offset. It returns TRUE on success or FALSE on failure.

Parameters

req_identifier

This is the request identifier.

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

TRUE on success.

FALSE on failure.

Examples

Example #1 cubrid_field_seek() 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
    {
        
cubrid_field_seek($result,2);
        
$meta cubrid_fetch_field($result);
        if (!
$meta
        {
            echo 
"No information available<br />\n";
        }
        echo 
"<pre>
        max_length:        
$meta->max_length
        multiple_key:        
$meta->multiple_key
        name:            
$meta->name
        not_null:        
$meta->not_null
        numeric:        
$meta->numeric
        table:            
$meta->table
        type:            
$meta->type
        default:        
$meta->def
        unique_key:        
$meta->unique_key
        </pre>"
;


        
cubrid_close_request($result); 
    }
?>

The above example will output:

Result:
    max_length:        21
    multiple_key:        1
    name:            address
    not_null:        0
    numeric:            0
    table:            employees
    type:            STRING
    default:        
    unique_key:        0

Cubrid Functions
PHP Manual