faqts : Computers : Programming : Languages : PHP : Database Backed Sites : Oracle

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 41 people (46%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

I have PDF files stored in Oracle BLOBs but can't seem to find a way with PHP3/OCI8 to get one out of the blob and write as a PDF file. Any help?

Jul 24th, 2000 08:31
benoit noss, Doug Williams,


I haven't tried it but you can perhaps test this code portion to output 
a pdf file on the browser
header("Content-type: application/pdf");
$conn = OCILogon("user","passwd","ORACLE_INSTANCE");
$recherche="select pdf_field from table where unique_clause";
$stmt = OCIParse($conn,$recherche);
ociexecute($stmt);
$ok=OCIFetchInto($stmt,&$data,OCI_ASSOC);
echo($data[ "PDF_FIELD" ]);