PHP Doku:: Returns the value of a specific field in a specific row - function.cubrid-result.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatenbankerweiterungenAnbieterspezifische DatenbankerweiterungenCubridCubrid Funktionencubrid_result

Ein Service von Reinhard Neidl - Webprogrammierung.

Cubrid Funktionen

<<cubrid_real_escape_string

cubrid_rollback>>

cubrid_result

(PECL CUBRID >= 8.3.0)

cubrid_resultReturns the value of a specific field in a specific row

Beschreibung

string cubrid_result ( resource $req_identifier , int $row [, mixed $field = 0 ] )

This function returns the value of a specific field in a specific row from a result set.

Parameter-Liste

req_identifier

This is the request identifier.

row

The row number from the result that is being retrieved. Row numbers start at 0.

field

The name or offset of the field being retrieved. It can be the field's offset, the field's name, or the field's table dot field name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. If undefined, the first field is retrieved.

Rückgabewerte

Value of a specific field, on success (NULL if value if null).

FALSE on failure.

Beispiele

Beispiel #1 cubrid_result() 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
    {
        echo 
"The address value of third record is ".cubrid_result($result22);
        
        
cubrid_close_request($result); 
    }
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

Result:
The address value of third record is 81254, CA

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",...)