note 22877 deleted from function.ibase-blob-create by didou
| From: | didou@php.net | Date: | Sun, 27 Jul 2003 18:25:36 +0000 |
| Subject: | note 22877 deleted from function.ibase-blob-create by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52778@lists.php.net to get a copy of this message | ||
Note Submitter: maxowl@phpclub.net
----
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()>