oci_set_prefetch
<<<
oci_statement_type ocibindbyname
>>>

8.85 Oracle 8
8 Référence des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes pré-définies
Exemples
oci_bind_by_name
oci_cancel
oci_close
OCI-Collection->append
OCI-Collection->assign
OCI-Collection->assignElem
OCI-Collection->getElem
OCI-Collection->free
OCI-Collection->max
OCI-Collection->size
OCI-Collection->trim
oci_commit
oci_connect
oci_define_by_name
oci_error
oci_execute
oci_fetch_all
oci_fetch_array
oci_fetch_assoc
oci_fetch_object
oci_fetch_row
oci_fetch
oci_field_is_null
oci_field_name
oci_field_precision
oci_field_scale
oci_field_size
oci_field_type_raw
oci_field_type
descriptor->free
oci_free_statement
oci_internal_debug
lob->append
lob->close
oci_lob_copy
lob->eof
lob->erase
lob->export
lob->flush
lob->import
oci_lob_is_equal
lob->load
lob->read
lob->rewind
lob->save
lob->seek
lob->size
lob->tell
lob->truncate
lob->writeTemporary
lob->write
oci_new_collection
oci_new_connect
oci_new_cursor
oci_new_descriptor
oci_num_fields
oci_num_rows
oci_parse
oci_password_change
oci_pconnect
oci_result
oci_rollback
oci_server_version
oci_set_prefetch
->oci_statement_type
ocibindbyname
ocicancel
ocicloselob
ocicollappend
ocicollassign
ocicollassignelem
ocicollgetelem
ocicollmax
ocicollsize
ocicolltrim
ocicolumnisnull
ocicolumnname
ocicolumnprecision
ocicolumnscale
ocicolumnsize
ocicolumntype
ocicolumntyperaw
ocicommit
ocidefinebyname
ocierror
ociexecute
ocifetch
ocifetchinto
ocifetchstatement
ocifreecollection
ocifreecursor
ocifreedesc
ocifreestatement
lob->getBuffering
ociinternaldebug
ociloadlob
ocilogoff
ocilogon
ocinewcollection
ocinewcursor
ocinewdescriptor
ocinlogon
ocinumcols
ociparse
ociplogon
ociresult
ocirollback
ocirowcount
ocisavelob
ocisavelobfile
ociserverversion
lob->setBuffering
ocisetprefetch
ocistatementtype
ociwritelobtofile
ociwritetemporarylob

8.85.72 oci_statement_type()Retourne le type de commande Oracle

[ Exemples avec oci_statement_type ]   PHP 5

string  oci_statement_type ( resource   statement )

oci_statement_type retourne le type de la commande statement . oci_statement_type retourne une des valeurs suivantes :

  1. SELECT
  2. UPDATE
  3. DELETE
  4. INSERT
  5. CREATE
  6. DROP
  7. ALTER
  8. BEGIN
  9. DECLARE
  10. UNKNOWN

Le paramètre statement est une requête Oracle valide, retournée par oci_parse .

Exemple avec ocistatementtype

<?php
$conn
= oci_connect("scott", "tiger");
$sql  = "delete from emp where deptno = 10";
   
$stmt = oci_parse($conn, $sql);
if (
oci_statement_type($stmt) == "DELETE") {
  die (
"Nous n'êtes pas autorisés à effacer des lignes dans cette<br />");
}
   
oci_close($conn);
?>

oci_statement_type retourne FALSE en cas d'erreur.

Note

Dans les versions de PHP antérieures à la version 5.0.0, vous devez utiliser la fonction ocistatementtype . Cet ancien nom est toujours utilisable : un alias a été fait vers la fonction oci_statement_type , pour assurer la compatibilité ascendante. Toutefois, il est recommandé de ne plus l'utiliser.

<< oci_statement_type >>
oci_set_prefetch Oracle 8 ocibindbyname