What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.



ibase_blob_add — Add data into a previously created BLOB


boolean ibase_blob_add(blob, data);
int blob: Handle to an open BLOB
string data: Data to be added to the BLOB


TRUE on success, FALSE on error


Adds the contents from data to the end of the BLOB specified by blob , created by ibase_blob_create() . You can construct a BLOB dynamically by either generating its contents on the fly or fetching data piecewise from different sources. If the data you want to add to a BLOB is in a file, ibase_blob_import() is a better alternative.

Note that creating, constructing, closing and inserting a BLOB into a database must happen within the same transaction context, i.e., you are not allowed to either commit or roll back the ongoing transaction until you have either inserted the BLOB into the database or discarded it with ibase_blob_cancel() .


Available in PHP 3 since 3.0.7, PHP 4 since 4.0RC1


Input parameter blob will change its type to resource in the future.


Example 527. Add data to a BLOB

// Adjust the ibase_connect() values for your environment
$conn = ibase_connect("/path/to/employees.gdb", 'username', 'password');

// Create, populate, and close the blob
$blobby = ibase_blob_create($conn);
ibase_blob_add($blobby, "Foo Bar Quux Baaz Kazaam!")
   || die("Couldn't add to blob on line " . __LINE__ . "\n");
$blob_id = ibase_blob_close($blobby);

// Insert the blob into our table
$res = ibase_query("INSERT INTO EMPLOYEES (emp_id, image) VALUES (1, ?)", $blob_id);

PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at The authors of this book have elected not to choose any options under the OPL. This online book was obtained from and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.