Home >php教程 >php手册 >php取得字段长度 mysql_field_len

php取得字段长度 mysql_field_len

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:07:17813browse

php取得字段长度 mysql_field_len 是用取得mysql_query返回的值的长度了,

语法:

mysql_field_len(data,field_offset)

data:必选项。指定的数据指针使用。数据指针是由于从mysql_query ( )函数


field_offset:要求。具体规定哪开始,开始返回。 0表示第一个栏位

$sql = "SELECT * from Person";
$result = mysql_query($sql,$con);
$length = mysql_field_len($result, 0);
echo $length;
结果为
20
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn