Get the field length in php mysql_field_len_PHP tutorial

WBOY
Release: 2016-07-13 17:04:08
Original
1007 people have browsed it

php gets the field length mysql_field_len is used to get the length of the value returned by mysql_query,

Syntax:

mysql_field_len(data,field_offset)
Copy after login

data: required. The specified data pointer is used. The data pointer is due from the mysql_query() function


field_offset:required. Specify where to start and return. 0 means the first field

$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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630894.htmlTechArticlephp gets the field length mysql_field_len to get the length of the value returned by mysql_query, syntax: mysql_field_len(data,field_offset) data: required. The specified data pointer is used. Data...
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!