By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,384 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

PDO ,Lobs and fpassthru

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.