Switch to: V11V10V9V8V7V6V5

valentina_field_len()

Declaration

int valentina_field_len ( 
             resource result, 
             int field_offset )

Parameters

Name Description
result The result resource that is being evaluated. This result comes from a call to valentina_query().
field_offset The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.

Description

Returns the length of the specified field.

Return Values

The name of the specified field index on success, or FALSE on failure.

Examples

Example 1.

<?php
$result = valentina_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
   echo 'Could not run query: ' . valentina_error();
   exit;
}
// Will get the length of the id field as specified in the database
// schema. 
$length = valentina_field_len($result, 0);
echo $length;
?> 

Notes

Note: For downward compatibility, the following deprecated alias may be used: valentina_fieldlen()

See Also