Jump to content

Selecting a blob


Recommended Posts

Good afternoon! I am trying to retrieve a blob from my db like this:

 

<?php
$queryGetBlob =
"SELECT contract_file
FROM schema.TABLE
WHERE contract_num = 23";
$getBlobResult = ociparse($connect, $queryGetBlob);
ociexecute($getBlobResult);

while($arrayBlob = ocifetch($getBlobResult))
{
echo $arrayBlob['CONTRACT_FILE']->load();
}

ocifreestatement($getBlobResult);
?>

 

I get these errors:

 

PHP Warning:  Cannot use a scalar value as an array

 

and

 

PHP Fatal error:  Call to a member function on a non-object

 

I realize that the first error is stating that $arrayBlob is not an array but I'm not sure why it isn't. This is my first time trying to fetch a blob. Can someone lend a hand? Thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/94943-selecting-a-blob/
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.