Services webmasters
Partenaires
Jeux concours gratuits
 
ocirollback
<<<
ocirowcount ocisavelob
>>>

7.72 Oracle 8
7 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes prédefinies
Exemples
ocibindbyname
ocicancel
ocicloselob
ocicollappend
ocicollassign
ocicollassignelem
ocicollgetelem
ocicollmax
ocicollsize
ocicolltrim
ocicolumnisnull
ocicolumname
ocicolumnprecision
ocicolumnscale
ocicolumnsize
ocicolumntype
ocicolumntyperaw
ocicommit
ocidefinebyname
ocierror
ociexecute
ocifetch
ocifetchinto
ocifetchstatement
ocifreecollection
ocifreecursor
ocifreedesc
ocifreestatement
ociinternaldebug
ociloadlob
ocilogoff
ocilogon
ocinewcollection
ocinewcursor
ocinewdescriptor
ocinlogon
ocinumcols
ociparse
ociplogon
ociresult
ocirollback
->ocirowcount
ocisavelob
ocisavelobfile
ociserverversion
ocisetprefetch
ocistatementtype
ociwritelobtofile
ociwritetemporarylob

7.72.49 ocirowcount()Retourne le nombre de lignes affectées par Oracle

[ Exemples avec ocirowcount ]   PHP 3>= 3.0.7, PHP 4

int  ocirowcount ( resource   stmt )

ocirowcount retourne le nombre de lignes affectées par la commande de modification (UPDATE) statement . Cette fonction ne vous indiquera pas le nombre de lignes retournées par un SELECT : il faut que les lignes aient été modifiées.

Exemple avec 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>";
?>

<< ocirowcount >>
ocirollback Oracle 8 ocisavelob
Services webmasters
Les manuels
 
CoursPHP.com - Reproduction interdite -