Forum und email

OCIRowCount

(PHP 4, PHP 5, PECL oci8:1.0-1.2.4)

OCIRowCount — Az érintett sorok száma

Leírás

int OCIRowCount ( int $statement )

Az OCIRowCount() visszaadja az érintett sorok számát például egy update parancs után. Ez a függvény nem adja vissza a select lekérdezés által visszaadott sorok számát!

Example#1 OCIRowCount

<?php
    print "<HTML><PRE>";
    $conn = OCILogon("scott","tiger");
    $stmt = OCIParse($conn,"create table dolgozok2 as select * from dolgozok");
    OCIExecute($stmt);
    print OCIRowCount($stmt) . " sor beillesztve.<BR>";
    OCIFreeStatement($stmt);
    $stmt = OCIParse($conn,"delete from dolgozok2");
    OCIExecute($stmt);
    print OCIRowCount($stmt) . " sor törölve.<BR>";
    OCICommit($conn);
    OCIFreeStatement($stmt);
    $stmt = OCIParse($conn,"drop table dolgozok2");
    OCIExecute($stmt);
    OCIFreeStatement($stmt);
    OCILogOff($conn);
    print "</PRE></HTML>";
?>