mssql_field_seekSeeks to the specified field offset
&reftitle.description;
boolmssql_field_seekresourceresultintfield_offset
Seeks to the specified field offset. If the next call to
mssql_fetch_field won't include a field
offset, this field would be returned.
&reftitle.parameters;
result
The result resource that is being evaluated. This result comes from a
call to mssql_query.
field_offset
The field offset, starts at 0.
&reftitle.returnvalues;
&return.success;
&reftitle.examples;
Using mssql_field_seek on the example for mssql_fetch_field
Table structure for \'persons\'';
echo '
';
// Table header
echo '';
echo '
';
echo '
Field name
';
echo '
Data type
';
echo '
Max length
';
echo '
';
echo '';
// Dump all fields
echo '';
for($i = 0; $i < mssql_num_fields($query); ++$i)
{
// Fetch the field information, notice the
// field_offset parameter is not set. See
// the mssql_field_seek call below
$field = mssql_fetch_field($query);
// Print the row
echo '
';
echo '
' . $field->name . '
';
echo '
' . strtoupper($field->type) . '
';
echo '
' . $field->max_length . '
';
echo '
';
// Move the internal seek pointer to the next
// row in the result set
mssql_field_seek($query, $i + 1);
}
echo '';
echo '
';
// Free the query result
mssql_free_result($query);
?>
]]>
&reftitle.seealso;
mssql_fetch_field