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

php取得字段长度 mysql_field_len

WBOY
Release: 2016-06-13 10:07:17
Original
796 people have browsed it

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

语法:

mysql_field_len(data,field_offset)
Copy after login

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


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

$sql = "SELECT * from Person";
$result = mysql_query($sql,$con);
Copy after login
$length = mysql_field_len($result, 0);
Copy after login
echo $length;
Copy after login
结果为
Copy after login
20
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template