note 11373 added to OCIBindByName
| From: | andrea at neutrini dot it | Date: | Sun, 18 Feb 2001 15:30:35 +0000 |
| Subject: | note 11373 added to OCIBindByName | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11214@lists.php.net to get a copy of this message | ||
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://www.php.net/manual/en/function.ocibindbyname.php