Can't load Blob with oci8

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
estero2002
Forum Newbie
Posts: 4
Joined: Mon Oct 01, 2007 10:15 pm

Can't load Blob with oci8

Post by estero2002 »

Hi, I'm trying to load a blob from an oracle db. The purpose is for downloading a file from the db. I've searched on the web and it seems to be always the same procedure:

Code: Select all

 
//$stmt is a valid descriptor for the executed query 'select blobcol from blobtable'
$result = oci_fetch_assoc($stmt);
$outVar = $result['blobcol']->load();
//At this point the variable $outVar turns to be null (tested with var_dump and by sending the headers and the var and downloading the file)
 
Any ideas?

Thank you in advance

Steve
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Can't load Blob with oci8

Post by McInfo »

PHP Manual: [url=http://www.php.net/manual/en/function.oci-fetch-assoc.php]oci_fetch_assoc()[/url] wrote:Note: Oracle returns all field names in uppercase and associative indices in the result array will be uppercased too.
Edit: This post was recovered from search engine cache.
Last edited by McInfo on Thu Jun 17, 2010 2:38 pm, edited 1 time in total.
estero2002
Forum Newbie
Posts: 4
Joined: Mon Oct 01, 2007 10:15 pm

Re: Can't load Blob with oci8

Post by estero2002 »

Yes, I've already tried that. I just forgot to modify it when I copied the code

Any other suggestions? I'm really stucked with this


thank you
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Can't load Blob with oci8

Post by McInfo »

Is the query in upper-case too?

It might help if you post more of the script.

Edit: This post was recovered from search engine cache.
Post Reply