Home > Backend Development > PHP Tutorial > Get the field length in php mysql_field_len_PHP tutorial

Get the field length in php mysql_field_len_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:04:08
Original
1072 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:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template