(PHP 3>= 3.0.7, PHP 4 )
OCIRowCount -- 적용되어진 열의 갯수를 가져온다
Description
int
OCIRowCount ( int statement)
OCIRowCount()함수는 update같은 구문에 의해 적용되어진
열의 갯수를 리턴한다. 이 함수는 select 가 리턴할 열의 갯수를
말해 주진 않을 것이다!
예 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>";
?> |
|