Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013
    Posts
    5

    Unanswered: blob columns and pdo

    can anyone tell me if the IBM Informix PDO supports retrieving blob data?
    the following does not work:

    $stmt = $db->prepare("select pdf from docs where id=?");
    $stmt->execute(array($_GET['id']));
    $stmt->bindColumn(1, $pdf, PDO::PARAM_LOB);
    $stmt->fetch(PDO::FETCH_BOUND);

    header("Content-Type: application/pdf");
    fpassthru($pdf);

    I had to use LOTOFILE(...), really cruddy

  2. #2
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    Hi,

    take a look at Tom Beebe's presentation for the washington area user group.
    He runs a simple
    Code:
    $stmt->execute();
    instead of your
    Code:
    $stmt->execute(array($_GET['id']));
    I agree that this is a presentation and not real application code, so I can't say whether this code works really. Just trying to help :-)

    Can you test this? Else I can find someone that could help
    Last edited by begooden-it; 05-25-13 at 03:39.

  3. #3
    Join Date
    Mar 2013
    Posts
    5

    read CLOB as stream unreliable

    Reading a CLOB with a stream is unreliable. I do not know if it's our environment or a problem with IBM's pdo or a problem with php.

    It "looses" a character intermittently. Almost seems like it's a hardware problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •