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 :
SELECT
UPDATE
DELETE
INSERT
CREATE
DROP
ALTER
BEGIN
DECLARE
UNKNOWN
Exemple 1. Exemple avec ocistatementtype() <?php
print "<HTML><PRE>";
$conn = OCILogon("scott","tiger");
$sql = "delete from emp where deptno = 10";
$stmt = OCIParse($conn,$sql);
if ( OCIStatementType($stmt) == "DELETE" ) {
die "Nous n'êtes pas autorisés à effacer des lignes dans cette table<BR>";
}
OCILogoff($conn);
print "</PRE></HTML>";
?> |
|