Warning: file_put_contents(): Only -1 of 55 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
mysql_field_flags mysql_field_name MySQL PHP Manual mysql_field_len (PHP 4, 5, PECL mysql:1.0) — Returns the length of specified field 설명 int ( resource $result , $field_offset ) mysql_field_...
Forum und email

mysql_field_len

(PHP 4, PHP 5, PECL mysql:1.0)

mysql_field_len — Returns the length of the specified field

설명

int mysql_field_len ( resource $result , int $field_offset )

mysql_field_len()은 특정 필드의 길이를 반환한다.

매개변수

result

mysql_query() 호출을 통한 결과 resource.

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.

반환값

성공하면 특정 필드의 길이를, 실패하면 FALSE를 반환한다.

예제

Example#1 mysql_field_len() 예제

<?php
$result 
= mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!
$result) {
    echo 
'Could not run query: ' . mysql_error();
    exit;
}

// Will get the length of the id field as specified in the database
// schema. 
$length = mysql_field_len($result, 0);
echo 
$length;
?>

주의

Note: 하위 호환을 위하여, 다음의 권장하지 않는 alias를 사용할 수 있습니다: mysql_fieldlen()