Subject | Re: [firebird-php] working w/ blobs |
---|---|
Author | Yves Glodt |
Post date | 2005-08-04T07:38:18Z |
Albert wrote:
$blob_id = ibase_blob_create();
ibase_blob_add($blob_id,'blob content');
$blob_id_str = ibase_blob_close($blob_id);
$sth = ibase_prepare('INSERT INTO ... VALUES (?,?,?,...)');
$trans=ibase_trans();
ibase_execute($sth,...,...,$blob_id_str,...);
ibase_commit($trans);
ibase_free_query($sth);
ibase_close($dbh);
Here is some basic information aswell:
http://phpbuilder.com/columns/glodt20020212.php3?page=6
> Hi all,Here is an example for inserting text into a blob:
>
> I need to pass some entries from a database to another. Basically, I execute
> a select and then an insert on the new one.
>
> The problem comes with the BLOB fields, I don't know how to process them,
> I've tried some of the php doc examples with no success at all.
>
> Has anyone done this?
$blob_id = ibase_blob_create();
ibase_blob_add($blob_id,'blob content');
$blob_id_str = ibase_blob_close($blob_id);
$sth = ibase_prepare('INSERT INTO ... VALUES (?,?,?,...)');
$trans=ibase_trans();
ibase_execute($sth,...,...,$blob_id_str,...);
ibase_commit($trans);
ibase_free_query($sth);
ibase_close($dbh);
Here is some basic information aswell:
http://phpbuilder.com/columns/glodt20020212.php3?page=6
> Thanks in advance,
>
> Albert
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
> .
>