pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris <dmagick@gmail.com>
To: Rico Secada <coolzone@it.dk>
Cc: pgsql-php@postgresql.org
Subject: Re: Can't get PHP PDO LOB working with PostgreSQL (WRONG CODE)
Date: Fri, 26 Sep 2008 13:57:42 +1000
Message-ID: <48DC5DB6.2070706@gmail.com> (raw)
In-Reply-To: <20080925213217.f2d80566.coolzone@it.dk>
References: <20080925213217.f2d80566.coolzone@it.dk>


> 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/




view thread (8+ messages)

Message-ID: <48DC5DB6.2070706@gmail.com>
Permalink:  ../48DC5DB6.2070706@gmail.com/
Also on:    postgresql.org/message-id/48DC5DB6.2070706@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: dmagick@gmail.com, coolzone@it.dk
  Subject: Re: Can't get PHP PDO LOB working with PostgreSQL (WRONG CODE)
  In-Reply-To: <48DC5DB6.2070706@gmail.com>
  References: <20080925213217.f2d80566.coolzone@it.dk> <48DC5DB6.2070706@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox