Firebird 2.0
PHP5 Programming
Manual

FBIRD_BLOB_ECHO

Purpose

Use the fbird_blob_echo function to output a blob directly to the browser.

Syntax

<blob_echo> ::=
   fbird_blob_echo( [ conn_hndl, ] blb_id)


Element 
Type
Description
conn_hndl
resource
A valid connection handle
blb_id
string
A valid blob ID
<return>
bool
True on success, False on failure

Semantics

This function opens a blob for reading and sends its contents directly to standard output (which is the browser, in most cases). Note that a blob ID is not the same as a blob handle.

If a connection handle is not provided, then the "default" connection will be used. The default connection is assigned every time you call fbird_connect or fbird_pconnect, so if you have multiple connections it will be whichever one was connected last.

This function returns True on success or False on failure.

Example

The below example echos a blob to the browser:

$sql = "SELECT blob_value FROM table ROWS 1 TO 1";
$result = ibase_query($sql);
$row = ibase_fetch_row($result);
fbird_blob_echo($row[0]);



See also

fbird_blob_get


previous page goto index next page

Legal information