PHP: fbsql_read_blob - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

fbsql_read_clob fbsql_query

Last updated: Sat, 27 Jan 2007

view this page in

# fbsql_read_blob

(PHP 4 >= 4.2.0, PHP 5)

fbsql_read_blob -- Read a BLOB from the database

## Описание

string fbsql_read_blob ( string blob_handle [, resource link_identifier] )

Reads BLOB data from the database.

If a select statement contains BLOB and/or CLOB columns FrontBase will return the data directly when data is fetched. This default behavior can be changed with fbsql_set_lob_mode() so the fetch functions will return handles to BLOB and CLOB data. If a handle is fetched a user must call fbsql_read_blob() to get the actual BLOB data from the database.

## Список параметров

`blob_handle`

  A BLOB handle, returned by fbsql_create_blob().

`link_identifier`

  A FrontBase link identifier returned by fbsql_connect() or fbsql_pconnect().

  If optional and not specified, the function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if fbsql_connect() was called with no arguments

## Возвращаемые значения

Returns a string containing the specified BLOB data.

## Примеры

Пример 1. fbsql_read_blob() example

`<?php
$link = fbsql_pconnect("localhost", "_SYSTEM", "secret")
or die("Could not connect");
$sql = "SELECT BLOB_COLUMN FROM BLOB_TABLE;";
$rs = fbsql_query($sql, $link);
$row_data = fbsql_fetch_row($rs);
// $row_data[0] will now contain the blob data for the first row
fbsql_free_result($rs);
$rs = fbsql_query($sql, $link);
fbsql_set_lob_mode($rs, FBSQL_LOB_HANDLE);
$row_data = fbsql_fetch_row($rs);
// $row_data[0] will now contain a handle to the BLOB data in the first row
$blob_data = fbsql_read_blob($row_data[0]);
fbsql_free_result($rs);
?>`

## Смотрите также

fbsql_create_blob()
fbsql_read_clob()
fbsql_set_lob_mode()

add a note User Contributed Notes
fbsql_read_blob
There are no user contributed notes for this page.
fbsql_read_clob fbsql_query

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST