Cubrid Functions
PHP Manual

cubrid_fetch_lengths

(PHP 4, PHP 5)

cubrid_fetch_lengthsReturns an array with the lengths of the values of each field from the current row

Description

array cubrid_fetch_lengths ( int $result )

This function returns an array with the lengths of the values of each field from the current row of the result set or it returns FALSE on failure.

Parameters

result

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

Return Values

An array, when process is successful.

FALSE on failure.

Examples

Example #1 cubrid_fetch_lengths() 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
    {
        
$rowcubrid_fetch_assoc($result);
        
$lengths cubrid_fetch_lengths($result);
        
print_r($row);
        echo 
"<br>";
        
print_r($lengths);
        
cubrid_close_request($result); 
    }
?>

The above example will output:

Result:
Array ( [name] => Peter [address] => 1st Avenue, New York [salary] => 1000.0000000000000000 ) 
Array ( [0] => 5 [1] => 20 [2] => 21 )

Cubrid Functions
PHP Manual