PDO ,Lobs and fpassthru

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gezerpunta

    PDO ,Lobs and fpassthru

    Hi

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

    $stmt = $db->prepare("selec t * from test where oid = 17056");
    $stmt->execute();
    $stmt->bindColumn('oi d', $lob, PDO::PARAM_LOB) ;
    $stmt->fetch(PDO::FET CH_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

  • Jerry Stuckle

    #2
    Re: PDO ,Lobs and fpassthru

    gezerpunta wrote:
    Hi
    >
    I need to fetch lobs with php script. I found it but there is an
    error.
    >
    $stmt = $db->prepare("selec t * from test where oid = 17056");
    $stmt->execute();
    $stmt->bindColumn('oi d', $lob, PDO::PARAM_LOB) ;
    $stmt->fetch(PDO::FET CH_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.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    Working...