Oracle parse and optimize the code at creation time.
To create a PL/SQL procedure MyGetFileName() in SQL*Plus:
SQL> connect hr/hrpwd@//localhost/XE SQL> create or replace procedure MyGetFileName (fnum_p in number, name_p out varchar2) as bf_l bfile; da_l varchar2(255); begin select image into bf_l from FileTest where FileNum = fnum_p; dbms_lob.filegetname(bf_l, da_l, name_p); end; /Back in PHP the filename is easily fetched from the database with an anonymous block. The
browser is redirected to the image similar to the previous example: