Oracle 8
ociDefineByName ociBindByName ociLogon ociPLogon ociNLogon ociLogOff ociexecute ociCommit ociRollback ociNewDescriptor ociRowCount ociNumCols ociResult ociFetch ociFetchInto ociFetchStatement ociColumnIsNULL ociColumnName ociColumnSize ociColumnType ociServerVersion ociStatementType ociNewCursor ociFreeStatement ociFreeCursor ociFreeDesc ociparse ociError ociinternaldebug OCICancel ocisetprefetch OCIWriteLobToFile OCISaveLobFile OCISaveLob OCILoadLob OCIColumnScale OCIColumnPrecision OCIColumnTypeRaw OCINewCollection OCIFreeCollection OCICollAssign OCICollAssignElem OCICollGetElem OCICollMax OCICollSize OCICollTrim
Description
int ocirowcount(resource statement )
ocirowcount retourne le nombre de lignes affectées par une commande de modification. Cette fonction ne vous indiquera pas le nombre de lignes retournées par un SELECT : il faut que les lignes aient été modifiées.
<?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>";?>