Re: Can't get PHP PDO LOB working with PostgreSQL (WRONG CODE)
Chris <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.php |
|---|---|
| Message-ID | <[email protected]> |
> I don't know if the above is correct or if PostgreSQL has received the
> binary data correctly, maybe someone can confirm this for me please?
If it has an id, I suspect postgres got it just fine.
> $stmt = $pdo->prepare("SELECT blob_type, attachment FROM attachments
> WHERE id = :id LIMIT 1");
> $stmt->bindParam(':id', $_GET['id'], PDO::PARAM_STR);
See examples here:
http://au.php.net/manual/en/function.pdo-pgsqllobopen.php
about how to get it back.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
Sent via pgsql-php mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php