CUBRID Функции
PHP Manual

cubrid_field_len

(PECL CUBRID >= 8.3.0)

cubrid_field_lenReturns the maximum length of the specified field

Описание

int cubrid_field_len ( resource $result , int $field_offset )

This function returns the maximum length of the specified field on success, or it returns FALSE on failure.

Список параметров

result

result comes from 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.

Возвращаемые значения

Maximum length, when process is successful.

FALSE on failure.

Примеры

Пример #1 cubrid_field_len() 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
    {
        
$length cubrid_field_len($result1);
        echo 
"Length of NAME field is ".$length;

        
cubrid_close_request($result); 
    }
?>

Результат выполнения данного примера:

Result:
Length of NAME field is 256

CUBRID Функции
PHP Manual