string OCIStatementType
OCIStatementType() は次の値のどれかを返します。
"SELECT"
"UPDATE"
"DELETE"
"INSERT"
"CREATE"
"DROP"
"ALTER"
"BEGIN"
"DECLARE"
"UNKNOWN"
例 1. コーディング例
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