473,320 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PDO ,Lobs and fpassthru

Hi

I need to fetch lobs with php script. I found it but there is an
error.

$stmt = $db->prepare("select * from test where oid = 17056");
$stmt->execute();
$stmt->bindColumn('oid', $lob, PDO::PARAM_LOB);
$stmt->fetch(PDO::FETCH_BOUND);
echo $lob;
fpassthru($lob);

it returns

///////
17056
Warning: fpassthru(): supplied argument is not a valid stream resource
in /home/kkk/public_html/haxxxxxxxxx.php on line 20
//////

$lob returns an id but fpassthru doesn t execute with this id.

Where is the wrong?

thks

May 23 '07 #1
1 2632
gezerpunta wrote:
Hi

I need to fetch lobs with php script. I found it but there is an
error.

$stmt = $db->prepare("select * from test where oid = 17056");
$stmt->execute();
$stmt->bindColumn('oid', $lob, PDO::PARAM_LOB);
$stmt->fetch(PDO::FETCH_BOUND);
echo $lob;
fpassthru($lob);

it returns

///////
17056
Warning: fpassthru(): supplied argument is not a valid stream resource
in /home/kkk/public_html/haxxxxxxxxx.php on line 20
//////

$lob returns an id but fpassthru doesn t execute with this id.

Where is the wrong?

thks
$lob is a resource id, but not the correct type. fpassthru() requires a
resource id created by fopen().

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 23 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: GameDev | last post by:
I have a section of my website where customers can login and download a few select files. The download links are to php scripts that decide which files to download. Generally it works fine....
6
by: Steve | last post by:
hello all im looking to make a download script as i cannot use the .htaccess to control directory access to files as im using a php login system using mysql and sessions. i have been playing...
4
by: Leslie Houk | last post by:
I'm just learning PHP, and I'm having a problem using fpassthru(). I want to download a file using the following code segment I found, which I put into my testing file called portal.php: ...
2
by: stefan.machwirth | last post by:
Hi! I have a PHP page "transfer.php" and a MySQL db. The client should download binary files by "http://.... /transfer.php?ID=xx", where the ID is searched in the db and the real URI is read. ...
1
by: Fredrik Lindstrom | last post by:
Hi folks! When I browse the web about information regarding dequeue and enqueue (b)lobs to an Advanced Queue in PRO/C I do not find a good example. About RAW I can find a lot of info and because...
9
by: Rom Marshall | last post by:
Hi. Once a LOB size goes beyond 32KB in size, I'm not able to use the LOAD utility to unload the data off the tables for DB2 7.1 on OS/390. Instead, the documentation refers to a sample C++...
1
by: stoat2337 | last post by:
I'm looking to purge rows from a DB2 table that contains both a CLOB (1M) and BLOB (51K), but our DBA is not familiar with LOBs. I work on a mainframe (z/OS), and we don't normally use LOBs in our...
2
by: mjf | last post by:
Hello, I have a table that has a BLOB field, which is defined as follows: create table raw_image( image_id INTEGER NOT NULL, image BLOB(2M)) I intend to use import utility to import...
4
by: andre rodier | last post by:
Hello, I need to display or propose a jpeg image on a web page. When I need to display the image, I use this code : header("Content-Length: $fileSize") ; header("Content-Type: $type") ;...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.