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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
# 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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|