PHP Manual
Prev |  | Next

# OCIStatementType

OCIStatementType -- Return the type of an OCI statement.

## Description

`string OCIStatementType`(int stmt);

OCIStatementType() returns on of the following values:

1. "SELECT"

2. "UPDATE"

3. "DELETE"

4. "INSERT"

5. "CREATE"

6. "DROP"

7. "ALTER"

8. "BEGIN"

9. "DECLARE"

10. "UNKNOWN"

Example 1. Code examples

      1
      2 <?php
      3     print "<HTML><PRE>";
      4     $conn = OCILogon("scott","tiger");
      5     $sql  = "delete from emp where deptno = 10";
      6
      7     $stmt = OCIParse($conn,$sql);
      8     if ( OCIStatementType($stmt) == "DELETE" ) {
      9         die "You are not allowed to delete from this table<BR>";
     10     }
     11
     12     OCILogoff($conn);
     13     print "</PRE></HTML>";
     14 ?>
     15

Prev | Home | Next
OCIServerVersion | Up | OCINewCursor