Re: how to get blobs from SELECT in interbase with php?

From: Date: Tue, 17 Oct 2000 19:18:32 +0000
Subject: Re: how to get blobs from SELECT in interbase with php?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3691@lists.php.net to get a copy of this message
On Tue, 17 Oct 2000, Lutz Brueckner wrote: > Max Derkachev <kot@books.ru> wrote: > > > I am wondering how could i get blob value from interbase with php, > > e.g. : > > $query = "select blob_field from sometable"; > > $sth = ibase_query($dbh, $query); > > $res = ibase_fetch_object($sth); > > print $res->BLOB_FIELD; > > > > now, when i do so, I get several bytes (i guess it's a beginning of the > > blob). > > To get the blob data you have to do > > $bid = ibase_blob_open($res->BLOB_FIELD); > $blobdata = ibase_blob_get($bid, $length); > ibase_blob_close($bid); > > > But so far as I know there is no way to put blob data into > the table through php, because of a bug concerning the > handling of binding args in ibase_query(). > > Please let me know if you find a way ... Should be fixed now in the current CVS. Fetch the latest version of interbase.c from http://cvs.php.net/viewcvs.cgi/~checkout~/php4/ext/interbase/interbase.c?rev=1.45 and recompile. -- Jouni Ahto

« previous php.db (#3691) next »