mysql_field_flags(result,offset)

Description: Returns the flags associated with a specified field in a result.

After calling mysql_list_fields(), mysql_query(), or another function that returns a resource identifier given by result, mysql_field_flags() returns the flags of a given field indexed by offset. Flags are returned as a string of text separated by spaces, including any of the following: auto_increment, not_null, primary_key, unique_key, multiple_key, blob, unsigned, zerofill, binary, enum, timestamp, or according to the version of MySQL in use.

Example:

$result = mysql_list_fields ("cms", "subscribers");
$flags = mysql_field_flags ($result, 0);  // offset of 0 means the first column
$flags_array = explode (" ", $flags);
while (list ($k,$flag) = each ($flags_array)) {
    echo "$flag<BR>
";
}

See also: mysql_field_len(), mysql_field_name(), mysql_field_type(), mysql_list_fields()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.94.153