Now let's take a look at mysql_fetch_field () function, this function is to read mysql table name, field name. Here we take a look at the syntax of Oh.
mysql_fetch_field (data, field_offset) The mysql_fetch_field () function object is a recordset that returns the .mysql_query () function and returns an object on the success, or FALSE or fails when he has two parameters .data and field_offset data: Mandatory, Data pointer to use. The data pointer is due to the field_offset: optional from mysql_query (), which record to start reading, not writing code starting 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. "<br />";
}
The output is the result of all the field names in your data table.