PHP Doku:: Returns the maximum length of the specified field - function.cubrid-field-len.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-Startseite ≥ PHP-Handbuch ≥ Funktionsreferenz ≥ Datenbankerweiterungen ≥ Anbieterspezifische Datenbankerweiterungen ≥ Cubrid ≥ Cubrid Funktionen ≥ cubrid_field_len

Ein Service von Reinhard Neidl - Webprogrammierung.

Cubrid Funktionen

<<cubrid_field_flags

cubrid_field_name>>

cubrid_field_len

(PECL CUBRID >= 8.3.0)

cubrid_field_len — Returns the maximum length of the specified field

Beschreibung

int cubrid_field_len ( resource $req_identifier , int $field_offset )

This function returns the maximum length of the specified field on success, or it returns FALSE on failure.

Parameter-Liste

req_identifier

This is the request identifier.

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.

Rückgabewerte

Maximum length, when process is successful.

FALSE on failure.

Beispiele

Beispiel #1 cubrid_field_len() example

<?php
    $link 
= cubrid_connect("localhost", 30000, "demodb2", "dba", "");
    if (!
$link)
    {
        die(
'Could not connect.');
    }
    
$query = 'SELECT id, name, address, salary FROM employees';
    
$result = cubrid_execute($link, $query);
    if (
$result) 
    {
        
$length = cubrid_field_len($result, 1);
        echo 
"Length of NAME field is ".$length;

        
cubrid_close_request($result); 
    }
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

Result:
Length of NAME field is 256

Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)