(PHP 4 >= 4.0.6, PHP 5)

fbsql_fetch_field --  Get column information from a result and return as an object


object fbsql_fetch_field ( resource result [, int field_offset])

Returns an object containing field information.

fbsql_fetch_field() can be used in order to obtain information about fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by fbsql_fetch_field() is retrieved.

The properties of the object are:

Example 1. fbsql_fetch_field() example

($host, $user, $password)
    or die(
"Could not connect");
$result = fbsql_db_query("database", "select * from table")
    or die(
"Query failed");
# get column metadata
$i = 0;
while (
$i < fbsql_num_fields($result)) {
"Information for column $i:<br />\n";
$meta = fbsql_fetch_field($result);
    if (!
$meta) {
"No information available<br />\n";
max_length:   $meta
name:         $meta
not_null:     $meta
table:        $meta
type:         $meta

See also fbsql_field_seek().

Sites of interest: Web Hosting : Reseller Hosting : Website Hosting : HTML Editor : Web Design Templates : Free Web Hosting : ASP code examples : PHP & MySQL Code Examples
  Copyright 2004 Evrsoft Developer Network. Privacy policy - Link to Us

Contact Evrsoft