mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Fix the example according to user contributed notes
The column "oid" doesn't contain the large object itself but its identifier. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@329258 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c0a67e0c16
commit
058f45a9c9
1 changed files with 4 additions and 2 deletions
|
@ -78,9 +78,11 @@ $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|||
$db->beginTransaction();
|
||||
$stmt = $db->prepare("select oid from BLOBS where ident = ?");
|
||||
$stmt->execute(array($some_id));
|
||||
$stmt->bindColumn('oid', $lob, PDO::PARAM_LOB);
|
||||
$stmt->bindColumn('oid', $oid, PDO::PARAM_STR);
|
||||
$stmt->fetch(PDO::FETCH_BOUND);
|
||||
fpassthru($lob);
|
||||
$stream = $db->pgsqlLOBOpen($oid, 'r');
|
||||
header("Content-type: application/octet-stream");
|
||||
fpassthru($stream);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue