Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Phalcon - CLOB - Oracle - Returns Resource(#) #11816

Closed
arthurgermano opened this issue May 20, 2016 · 1 comment
Closed

Phalcon - CLOB - Oracle - Returns Resource(#) #11816

arthurgermano opened this issue May 20, 2016 · 1 comment

Comments

@arthurgermano
Copy link

Hi.. Please I have the following issue:

  1. I am using find to search in the database records, so far so good, records coming back nicely;
  2. CLOB fields are returning with (Resource id Render LEVEL doesn't work correctly #4) or (Resource id Documentation typos #3)

So I would need the actual content, not Resource id.

Any ideias how to solve this ?

Many thanks.. cheers!

@arthurgermano
Copy link
Author

I found the solution to this problem

Since it returns resource id
We have to execute

stream_get_contents($clobField);

It will return the content.

This link I found the solution
http://wezfurlong.org/blog/2005/oct/lob-support-added-to-pdo-oci-in-php-5-1-cvs-finally/

It says that we also can set this
$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);

to return Strings.. I did'nt tried but seems a nice solution too..

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant