OCIRowCount
(PHP 4, PHP 5, PECL oci8:1.0-1.2.4)
OCIRowCount — Obtiene el número de filas afectadas
Descripción
int OCIRowCount
( int $statement
)
OCIRowCount() devuelve el número de filas afectadas, por ej. en sentencias de actualización. !Esta función no indicará el número de de filas que devuelve una sentencia SELECT!
Example#1 OCIRowCount
<?php
print "<HTML><PRE>";
$conn = OCILogon("scott","tiger");
$stmt = OCIParse($conn,"create table emp2 as select * from emp");
OCIExecute($stmt);
print OCIRowCount($stmt) . " rows inserted.<BR>";
OCIFreeStatement($stmt);
$stmt = OCIParse($conn,"delete from emp2");
OCIExecute($stmt);
print OCIRowCount($stmt) . " rows deleted.<BR>";
OCICommit($conn);
OCIFreeStatement($stmt);
$stmt = OCIParse($conn,"drop table emp2");
OCIExecute($stmt);
OCIFreeStatement($stmt);
OCILogOff($conn);
print "</PRE></HTML>";
?>