Mysql Tutorial: read the data table field name mysql_fetch_field (). Now let's take a look at the mysql_fetch_field () function. this function reads the instance name and field name of the mysql data table. let's take a look at its syntax. mysql_fetch_field (data, field_o now let's take a look at the mysql_fetch_field () function. this function reads the instance name and field name of the mysql data table. let's take a look at its syntax.
mysql_fetch_field(data,field_offset)
Mysql_fetch_field ()For example, if the record set returns the. mysql_query () function and returns the success of an object, or if it is FALSE or fails
It has two parameters:. data and field_offset.
Data: Required. the specified data pointer is used. The data pointer is generated from the mysql_query () function.
Field_offset: (optional) the record to read from. If this parameter is left blank, the code starts from 0.
Now let's look at a mysql_fetch_field instance.
$sql = "SELECT * from a";
$result = mysql_query($sql,$con);
While ($ property = mysql_fetch_field ($ result) {echo "Field name:". $ property-> name ."
";}
The output result is the name of all fields in your data table.
Mysql_fetch_field () function. this function reads the instance name and field name of the mysql data table. let's take a look at its syntax. mysql_fetch_field (data, field_o...