note 22877 added to function.ibase-blob-create
| From: | maxowl at phpclub dot net | Date: | Wed, 03 Jul 2002 04:10:37 +0000 |
| Subject: | note 22877 added to function.ibase-blob-create | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32531@lists.php.net to get a copy of this message | ||
ibase_blob_create -- create new BLOB
Description
int ibase_blob_create([int link | trans]);
Returns: blob_id or false on error.
ibase_blob_create create new BLOB in database for filling with data.
example:
/* create blob */
$blob_id = ibase_blob_create();
/* fill with data */
ibase_blob_add($blob_id, "string1");
ibase_blob_add($blob_id, "string2");
ibase_blob_add($blob_id, "string3");
ibase_blob_add($blob_id, "last string");
/* close and get $blob_id_str for inserting into table */
$blob_id_str = ibase_blob_close($blob_id);
/* finally insert blob into table */
ibase_query("INSERT INTO BLOB_TABLE (BLOB_NUM, BLOB_1) VALUES (1, ?)",$blob_id_str);
Note: Be careful with transaction stuff here. Create and insert intotable must be in one transaction
context.
See also <ibase_blob_add()>, <ibase_blob_close()>, <ibase_blob_cancel()>
--
http://www.php.net/manual/en/function.ibase-blob-create.php
http://master.php.net/manage/user-notes.php?action=edit+22877
http://master.php.net/manage/user-notes.php?action=delete+22877
http://master.php.net/manage/user-notes.php?action=reject+22877