Skip site navigation (1) Skip section navigation (2)

Re: Can't get PHP PDO LOB working with PostgreSQL (WRONG CODE)

From: Chris <dmagick(at)gmail(dot)com>
To: Rico Secada <coolzone(at)it(dot)dk>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Can't get PHP PDO LOB working with PostgreSQL (WRONG CODE)
Date: 2008-09-26 03:57:42
Message-ID: 48DC5DB6.2070706@gmail.com (view raw or flat)
Thread:
Lists: pgsql-php
> 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/


In response to

pgsql-php by date

Next:From: A BDate: 2008-09-30 07:23:06
Subject: Unknown: Cannot set connection to blocking mode in Unknown on line 0
Previous:From: Rico SecadaDate: 2008-09-25 21:37:29
Subject: Re: Can't get PHP PDO LOB working with PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group