note 11373 deleted from function.ocibindbyname by sixd
| From: | sixd@php.net | Date: | Wed, 20 Nov 2013 19:47:22 +0000 |
| Subject: | note 11373 deleted from function.ocibindbyname by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197585@lists.php.net to get a copy of this message | ||
Note Submitter: andrea at neutrini dot it
----
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);
?>