Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 10254

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>udm_alloc_agent</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="mnoGoSearch Functions"
HREF="ref.mnogosearch.html"><LINK
REL="PREVIOUS"
TITLE="udm_alloc_agent_array"
HREF="function.udm-alloc-agent-array.html"><LINK
REL="NEXT"
TITLE="udm_api_version"
HREF="function.udm-api-version.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></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"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.udm-alloc-agent-array.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.udm-api-version.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.udm-alloc-agent"
></A
>udm_alloc_agent</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN127070"
></A
><P
>    (PHP 4 &#62;= 4.0.5, PHP 5 &#60;= 5.0.4)</P
>udm_alloc_agent&nbsp;--&nbsp;Allocate mnoGoSearch session</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN127073"
></A
><H2
>Description</H2
>resource <B
CLASS="methodname"
>udm_alloc_agent</B
> ( string dbaddr [, string dbmode] )<BR
></BR
><P
>&#13;    Returns a mnogosearch agent identifier on success, <TT
CLASS="constant"
><B
>FALSE</B
></TT
> on failure. This
    function creates a session with database parameters.
   </P
><P
>&#13;    <CODE
CLASS="parameter"
>dbaddr</CODE
> - URL-style database description, with
    options (type, host, database name, port, user and password) to connect 
    to SQL database. Do not matter for built-in text files support. Format for
    <CODE
CLASS="parameter"
>dbaddr</CODE
>:
    <TT
CLASS="literal"
>DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/</TT
>.
    Currently supported DBType values are: mysql, pgsql, msql, solid, mssql, oracle, 
    and ibase. Actually, it does not matter for native libraries support, but
    ODBC users should specify one of the supported values. If your database 
    type is not supported, you may use <TT
CLASS="literal"
>unknown</TT
> instead.
  </P
><P
>&#13;    <CODE
CLASS="parameter"
>dbmode</CODE
> - You may select the SQL database mode of
    words storage. Possible values of <CODE
CLASS="parameter"
>dbmode</CODE
> are:
    <TT
CLASS="literal"
>single</TT
>, <TT
CLASS="literal"
>multi</TT
>, <TT
CLASS="literal"
>crc</TT
>,
    or <TT
CLASS="literal"
>crc-multi</TT
>. When <TT
CLASS="literal"
>single</TT
> is
    specified, all words are stored in the same table. If <TT
CLASS="literal"
>multi
    </TT
> is selected, words will be located in different tables depending
    of their lengths. "multi" mode is usually faster, but requires more tables
    in the database. If "crc" mode is selected, mnoGoSearch will store 32 bit
    integer word IDs calculated by CRC32 algorithm instead of words. This mode
    requires less disk space and it is faster comparing with "single" and
    "multi" modes. <TT
CLASS="literal"
>crc-multi</TT
> uses the same storage structure
    with the "crc" mode, but also stores words in different tables depending on
    words lengths like in "multi" mode.
   </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
     <CODE
CLASS="parameter"
>dbaddr</CODE
> and <CODE
CLASS="parameter"
>dbmode</CODE
> must match 
     those used during indexing.
    </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
     In fact this function does not open a connection to the database and
     thus does not check the entered login and password. Establishing a
     connection to the database and login/password verification is done by
     <A
HREF="function.udm-find.html"
><B
CLASS="function"
>udm_find()</B
></A
>.
    </P
></BLOCKQUOTE
></DIV
></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.udm-alloc-agent-array.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.udm-api-version.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>udm_alloc_agent_array</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.mnogosearch.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>udm_api_version</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>