Google

NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.73 ">

ociStatementType

(PHP 3>= 3.0.5, PHP 4 )

ociStatementType -- Retourne le type de commande OCI.

Description

string ocistatementtype ( resource stmt)

ocistatementtype() 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"

Exemple 1. Exemples

<?php
    print "<HTML><PRE>";
    $conn = ociLogon("scott","tiger");
    $sql  = "delete from emp where deptno = 10";
    $stmt = ociparse($conn,$sql);
    if ( ociStatementType($stmt) == "DELETE" ) {
        die "Vous n'etes pas autorisé à effacer dans cette table.<BR>";
    }
    ociLogoff($conn);
    print "</PRE></HTML>";
?>