fbsql_read_clob

(PHP 4 >= 4.2.0, PHP 5, PHP 7)

fbsql_read_clobRead a CLOB from the database

설명

string fbsql_read_clob ( string $clob_handle [, resource $link_identifier ] )

Reads CLOB 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_clob() to get the actual CLOB data from the database.

인수

clob_handle

A CLOB handle, returned by fbsql_create_clob().

link_identifier

fbsql_connect()fbsql_pconnect()가 반환한 FrontBase 연결 식별자.

선택적이고 지정하지 않았을 때, 함수는 FrontBase 서버로 열려있는 연결을 찾고, 찾지 못하면 fbsql_connect()를 인수 없이 호출했을 때처럼 연결을 시도합니다.

반환값

Returns a string containing the specified CLOB data.

예제

Example #1 fbsql_read_clob() example

<?php
$link 
fbsql_pconnect("localhost""_SYSTEM""secret")
    or die(
"Could not connect");
$sql "SELECT CLOB_COLUMN FROM CLOB_TABLE;";
$rs fbsql_query($sql$link);
$row_data fbsql_fetch_row($rs);
// $row_data[0] will now contain the clob data for the first row
fbsql_free_result($rs);

$rs fbsql_query($sql$link);
fbsql_set_lob_mode($rsFBSQL_LOB_HANDLE);
$row_data fbsql_fetch_row($rs);
// $row_data[0] will now contain a handle to the CLOB data in the first row
$clob_data fbsql_read_clob($row_data[0]);
fbsql_free_result($rs);

?>

참고

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top