Comunitatea PHP Romania
 

 
ovrimos_fetch_into

ovrimos_fetch_into

(PHP 4 >= 4.0.3, PHP 5)

ovrimos_fetch_into -- Fetches a row from the result set

Description

bool ovrimos_fetch_into ( int result_id, array result_array [, string how [, int rownumber]])

ovrimos_fetch_into() fetches a row from the result set into result_array, which should be passed by reference. Which row is fetched is determined by the two last parameters. how is one of Next (default), Prev, First, Last, Absolute, corresponding to forward direction from current position, backward direction from current position, forward direction from the start, backward direction from the end and absolute position from the start (essentially equivalent to 'first' but needs 'rownumber'). Case is not significant. rownumber is optional except for absolute positioning. Returnează TRUE în caz de succes, FALSE în caz contrar.

Exemplu 1. A fetch into example

<?php
$conn
=ovrimos_connect("neptune", "8001", "admin", "password");
if (
$conn!=0) {
    echo
"Connection ok!";
    
$res=ovrimos_exec($conn, "select table_id, table_name from sys.tables");
    if (
$res != 0) {
        echo
"Statement ok!";
        if (
ovrimos_fetch_into($res, &$row)) {
            list(
$table_id, $table_name) = $row;
            echo
"table_id=" . $table_id . ", table_name=" . $table_name . "\n";
            if (
ovrimos_fetch_into($res, &$row)) {
                list(
$table_id, $table_name) = $row;
                echo
"table_id=" . $table_id . ", table_name=" . $table_name . "\n";
            } else {
                echo
"Next: error\n";
            }
        } else {
            echo
"First: error\n";
        }
        
ovrimos_free_result($res);
    }
    
ovrimos_close($conn);
}
?>
This example will fetch a row.

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
la birou
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
Mascka Mascka
Braila
raul_ raul_
whooper whooper
Toronto ON
mihaitha mihaitha
Sibiu
gabysolomon gabysolomon
Bacau
oriceon oriceon
Constanta
garlicinicolae garlicinicolae

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Novela romantica | Credit Card | Debt Help | Debt Loans | Mobile Phones
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis