Latest web development tutorials
×

PHP corso

PHP corso PHP breve introduzione PHP installare PHP grammatica PHP variabile PHP echo/print PHP Tipi di dati PHP costante PHP stringa PHP operatori PHP If...Else PHP Switch PHP schieramento PHP Ordinamento di un array PHP superglobals PHP While circolazione PHP For circolazione PHP funzione PHP Variabili magici PHP Namespace PHP Object-Oriented

PHP modulo

PHP modulo PHP Forms Authentication PHP modulo - I campi obbligatori PHP modulo - e-mail di verifica e l'URL PHP esempio forma completa PHP $_GET variabile PHP $_POST variabile

PHP Tutorial avanzato

PHP array multidimensionali PHP data PHP contenere PHP file PHP File Upload PHP Cookie PHP Session PHP E-mail PHP sicurezza E-mail PHP Error PHP Exception PHP filtro PHP Filtro avanzato PHP JSON

PHP 7 nuove funzionalità

PHP 7 nuove funzionalità

PHP Database

PHP MySQL breve introduzione PHP MySQL collegamento PHP MySQL Creazione di un database PHP MySQL Creare una tabella di dati PHP MySQL inserire i dati PHP MySQL Inserire più dati PHP MySQL prepared statement PHP MySQL leggere i dati PHP MySQL WHERE PHP MySQL ORDER BY PHP MySQL UPDATE PHP MySQL DELETE PHP ODBC

PHP XML

XML Expat Parser XML DOM XML SimpleXML

PHP & AJAX

AJAX breve introduzione AJAX PHP AJAX Database AJAX XML AJAX ricerca in tempo reale AJAX RSS Reader AJAX voto

PHP Manuale di riferimento

PHP Array PHP Calendar PHP cURL PHP Date PHP Directory PHP Error PHP Filesystem PHP Filter PHP FTP PHP HTTP PHP Libxml PHP Mail PHP Math PHP Misc PHP MySQLi PHP PDO PHP SimpleXML PHP String PHP XML PHP Zip PHP Timezones PHP Elaborazione immagini PHP RESTful

PDOStatement :: nextRowset

Manuale PHP DOP di riferimento Manuale PHP DOP di riferimento

PDOStatement :: nextRowset - anticipo in un multi-linea impostata nel manico dichiarazione alla prossima serie di righe (PHP 5> = 5.1.0, PECL DOP> = 0.2.0)


spiegazione

grammatica

bool PDOStatement::nextRowset ( void )

Alcuni servizi di supporto database restituisce più di un set riga (chiamato anche un set di risultati) stored procedure.

PDOStatement :: nextRowset () consente di combinare accedere ad un oggetto PDOStatement il secondo e il successivo set di righe. Ogni riga può avere un diverso insieme di detto insieme di colonne.


Valore di ritorno

ritorno di successo TRUE, o in caso di errore restituisce false.


Esempi

Get set è composto da una pluralità di righe restituite da una stored procedure

L'esempio seguente mostra come chiamare una stored procedure che restituisce tre righe MULTIPLE_ROWSETS set. Con un do / while loop chiamando PDOStatement :: nextRowset () restituisce false quando più righe impostate ritorno e la fine del ciclo.

<?php
$sql = 'CALL multiple_rowsets()';
$stmt = $conn->query($sql);
$i = 1;
do {
    $rowset = $stmt->fetchAll(PDO::FETCH_NUM);
    if ($rowset) {
        printResultSet($rowset, $i);
    }
    $i++;
} while ($stmt->nextRowset());

function printResultSet(&$rowset, $i) {
    print "Result set $i:\n";
    foreach ($rowset as $row) {
        foreach ($row as $col) {
            print $col . "\t";
        }
        print "\n";
    }
    print "\n";
}
?>

L'output di esempio di cui sopra:

Result set 1:
apple    red
banana   yellow

Result set 2:
orange   orange    150
banana   yellow    175

Result set 3:
lime     green
apple    red
banana   yellow

Manuale PHP DOP di riferimento Manuale PHP DOP di riferimento