note 11373 modified in function.ocibindbyname by felipe

From: Date: Tue, 22 Jul 2008 18:52:03 +0000
Subject: note 11373 modified in function.ocibindbyname by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142526@lists.php.net to get a copy of this message
This script print the real name of a BFILE saved. It use OCIBindByName ... <?php $c1=OCILogon ("username","password","database"); $store_file = "NULL"; $query = "DECLARE Lob_loc BFILE; DIRS VARCHAR2(30); FILS VARCHAR2(40); BEGIN SELECT B_FILE INTO Lob_loc FROM TABLE_WHIT_B_FILE WHERE KEY=2 ; DBMS_LOB.FILEGETNAME(Lob_loc,DIRS,FILS); :NOME:=FILS; END;" $stmt = ociparse($c1,$query); OCIBindByName($stmt,":NOME",&$store_file,50); if(!ociexecute($stmt)) echo "Error"; echo $store_file ; OCIFreeStatement($stmt); OCILogOff($c1); ?> --was-- This script print the real name of a BFILE saved. It use OCIBindByName ... $c1=OCILogon ("username","password","database"); $store_file = "NULL"; $query = "DECLARE Lob_loc BFILE; DIRS VARCHAR2(30); FILS VARCHAR2(40); BEGIN SELECT B_FILE INTO Lob_loc FROM TABLE_WHIT_B_FILE WHERE KEY=2 ; DBMS_LOB.FILEGETNAME(Lob_loc,DIRS,FILS); :NOME:=FILS; END;" $stmt = ociparse($c1,$query); OCIBindByName($stmt,":NOME",&$store_file,50); if(!ociexecute($stmt)) echo "Error"; echo $store_file ; OCIFreeStatement($stmt); OCILogOff($c1); http://php.net/manual/en/function.ocibindbyname.php

« previous php.notes (#142526) next »