Firebird 2.0
PHP5 Programming
Manual

FBIRD_BLOB_CANCEL

Purpose

Use fbird_blob_cancel to cancel the creation of new blob object

Syntax

<blob_cancel> ::=
   fbird_blob_cancel(blb_hndl)


Element 
Type
Description
blb_hndl
resource
A valid blob handle open for writing
<return>
bool
True on success, False on failure

Semantics

This function will discard a blob object created by ibase_create_blob() if it has not yet been closed by ibase_blob_close(). Returns True on success or False on failure.

Example

The below example

dbh = fbird_connect($host, $user, $pass);

$blh = fbird_blob_create($dbh);
if( fbird_blob_add($blh, $data)==false ) {
   fbird_blob_cancel($blh);
} else {
   $blobid = ibase_blob_close($blh);

$sql = "INSERT INTO blobtable(blobfield) VALUES (?)";
$sth = fbird_query($dbh, $sql, $blobid);
}



See also

fbird_blob_create


previous page goto index next page

Legal information