(PHP 5, PHP 7, PECL OCI8 >= 1.1.0)
oci_num_rows — 锟斤拷锟斤拷锟斤拷锟街达拷泻锟斤拷锟接帮拷锟斤拷锟斤拷锟斤拷
$stmt
) : intoci_num_rows() 锟斤拷锟斤拷锟斤拷锟街达拷泻锟斤拷锟接帮拷锟斤拷锟斤拷锟斤拷锟斤拷
Note:
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 SELECT 锟斤拷询锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 SELECT 锟斤拷浔撅拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟� oci_fetch*() 锟斤拷锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
Example #1 oci_num_rows() 锟斤拷锟斤拷
<?php
echo "<pre>";
$conn = oci_connect("scott", "tiger");
$stmt = oci_parse($conn, "create table emp2 as select * from emp");
oci_execute($stmt);
echo oci_num_rows($stmt) . " rows inserted.<br />";
oci_free_statement($stmt);
$stmt = oci_parse($conn, "delete from emp2");
oci_execute($stmt, OCI_DEFAULT);
echo oci_num_rows($stmt) . " rows deleted.<br />";
oci_commit($conn);
oci_free_statement($stmt);
$stmt = oci_parse($conn, "drop table emp2");
oci_execute($stmt);
oci_free_statement($stmt);
oci_close($conn);
echo "</pre>";
?>
oci_num_rows() 锟节筹拷锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
Note:
锟斤拷 PHP 5.0.0 之前锟侥版本锟斤拷锟斤拷使锟斤拷 ocirowcount() 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷煤锟斤拷锟斤拷锟斤拷锟饺伙拷锟斤拷茫锟轿拷锟斤拷录锟斤拷锟斤拷锟轿� oci_num_rows() 锟侥憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟窖憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟狡硷拷使锟矫★拷