Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a34ed6838d4b29d38abd504392a4a797 > files > 594

php-manual-es-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>fbsql_read_blob</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual de PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="FrontBase Functions"
HREF="ref.fbsql.html"><LINK
REL="PREVIOUS"
TITLE="fbsql_query"
HREF="function.fbsql-query.html"><LINK
REL="NEXT"
TITLE="fbsql_read_clob"
HREF="function.fbsql-read-clob.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual de PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.fbsql-query.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.fbsql-read-clob.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.fbsql-read-blob"
></A
>fbsql_read_blob</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN18392"
></A
><P
>    (PHP 4 &#62;= 4.2.0)</P
>fbsql_read_blob&nbsp;--&nbsp;Read a BLOB from the database</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN18395"
></A
><H2
>Description</H2
>string <B
CLASS="methodname"
>fbsql_read_blob</B
> ( string blob_handle [, resource link_identifier])<BR
></BR
><P
> 
     Returns: A string containing the BLOB specified by blob_handle.
    </P
><P
> 
     <B
CLASS="function"
>fbsql_read_blob()</B
> reads BLOB data from the
     database.  If a select statement contains BLOB and/or BLOB
     columns FrontBase will return the data directly when data is
     fetched. This default behavior can be changed with
     <A
HREF="function.fbsql-set-lob-mode.html"
><B
CLASS="function"
>fbsql_set_lob_mode()</B
></A
> so the fetch functions
     will return handles to BLOB and CLOB data.  If a handle is
     fetched a user must call <B
CLASS="function"
>fbsql_read_blob()</B
> to
     get the actual BLOB data from the database.
    </P
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN18411"
></A
><P
><B
>Ejemplo 1. <B
CLASS="function"
>fbsql_read_blob()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?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 teh 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);
    
?&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
><P
>&#13;     See also: <A
HREF="function.fbsql-create-blob.html"
><B
CLASS="function"
>fbsql_create_blob()</B
></A
>,
     <B
CLASS="function"
>fbsql_read_blob()</B
>,
     <A
HREF="function.fbsql-read-clob.html"
><B
CLASS="function"
>fbsql_read_clob()</B
></A
>, and
     <A
HREF="function.fbsql-set-lob-mode.html"
><B
CLASS="function"
>fbsql_set_lob_mode()</B
></A
>.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.fbsql-query.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Inicio</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.fbsql-read-clob.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>fbsql_query</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.fbsql.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>fbsql_read_clob</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>