PDO::pgsqlLOBOpen

Beschreibung

PDO::pgsqlLOBOpen() opens a stream to access the data
referenced by oid. If mode
is r, the stream is opened for reading, if
mode is w, then the stream will
be opened for writing. You can use all the usual filesystem functions,
such as fread(), fwrite() and
fgets() to manipulate the contents of the stream.

Hinweis:
This function, and all manipulations of the large object,
must be called and carried out within a transaction.

Parameter-Liste

oid

A large object identifier.

mode

If mode is r, open the stream for reading.
If mode is w, open the stream for writing.

The beginTransaction() is required, if you want to $pdo->commit() (it's not required) then do it after the fpassthru.

On a side note, those using Zend Framework can call getConnection() on the standard PDO database object which will get them the $pdo object as above. Then just remember to disableLayout() and setNoRender() as necessary.