PDO::PARAM_LOB and MySQL

This is a discussion on PDO::PARAM_LOB and MySQL within the PHP General forums, part of the PHP Programming Forums category; Hi all. I'm trying to read binary data from a MySQL 5 database using PDO's PARAM_LOB stream, but ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-14-2006
Chris
 
Posts: n/a
Default PDO::PARAM_LOB and MySQL

Hi all.

I'm trying to read binary data from a MySQL 5 database using PDO's
PARAM_LOB stream, but it's not working. It always returns the data as a
string (not a stream).

I've found discussions where other people had this problem, but they all
seem to have been solved by settng the PDO::ATTR_EMULATE_PREPARES
attribute, which didn't work for me.

Here's the script I'm using
http://scratch.leftbrained.org/param_lob.phps

the get_db() function instantiates a named instance of the PDO object,
and returns it (or just returns it if it's already been created, which,
in this script, never happens). That instance, when created, is passed the

PDO::MYSQL_ATTR_USE_BUFFERED_QUERY flag.

I've tried disabling that to see if it affected my problem, and it didn't.

I based this code off the example in the documentation:

http://us2.php.net/manual/en/ref.pdo.php#AEN149844 (Example 12. Displaying an image from a database)

Any suggestions? It seems to be that it *should* be doing what I want, but it isn't.

Thanks,

Chris
Reply With Quote
  #2 (permalink)  
Old 11-14-2006
Roman Neuhauser
 
Posts: n/a
Default Re: [PHP] PDO::PARAM_LOB and MySQL

# listschris@leftbrained.org / 2006-11-14 07:57:33 -0800:
> I based this code off the example in the documentation:
>
> http://us2.php.net/manual/en/ref.pdo.php#AEN149844 (Example 12. Displaying
> an image from a database)
>
> Any suggestions? It seems to be that it *should* be doing what I want, but
> it isn't.


File a bug report.

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:21 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0