略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: mysql_fetch_lengths

2024-04-28

mysql_fetch_lengths

(PHP 4, PHP 5)

mysql_fetch_lengths 取得结果集中每个输出的长度

说明

mysql_fetch_lengths(resource $result): array

以数组返回上一次用 mysql_fetch_row() 取得的行中每个字段的长度,如果出错返回 false

mysql_fetch_lengths() 将上一次 mysql_fetch_row()mysql_fetch_array()mysql_fetch_object() 所返回的每个列的长度储存到一个数组中,偏移量从 0 开始。

参见 mysql_fetch_row()

add a noteadd a note

User Contributed Notes 1 note

up
-6
Bavo Janss
12 years ago
In case of UTF8 fields mysql_field_len() will return 3 times the maximum length (e.g. 30 for a VARCHAR(10) field)) for mysql_field_len() returns the byte length of the field not the defined size.

官方地址:https://www.php.net/manual/en/function.mysql-fetch-lengths.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3