Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 3064

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

<HTML
><HEAD
><TITLE
>DBM Functions [deprecated]</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Function Reference"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="dbase_replace_record"
HREF="function.dbase-replace-record.html"><LINK
REL="NEXT"
TITLE="dblist"
HREF="function.dblist.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="reference"
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 Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.dbase-replace-record.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.dblist.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.dbm"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>XX. DBM Functions [deprecated]</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN17409"
></A
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="dbm.intro"
></A
>Introduction</H1
><P
>&#13;     These functions allow you to store records stored in a dbm-style
     database. This type of database (supported by the Berkeley DB,
     <A
HREF="ftp://ftp.gnu.org/pub/gnu/gdbm/"
TARGET="_top"
>GDBM</A
>, and some system libraries,
     as well as a built-in flatfile library) stores key/value pairs
     (as opposed to the full-blown records supported by relational
     databases).
    </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      However, dbm support is deprecated and you are encourged to use the
      <A
HREF="ref.dba.html"
>Database (dbm-style) abstraction layer functions</A
>
      instead.
     </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="dbm.required"
></A
>Requirements</H1
><P
>&#13;     To use this functions you have to compile PHP with support for an
     underlying database. See the 
     <A
HREF="ref.dba.html#dba.requirements"
>list</A
> of supported Databases.
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="dbm.installation"
></A
>Installation</H1
><P
>&#13;  In order to use these functions, you must compile PHP with dbm support
  by using the <TT
CLASS="option"
>--with-db</TT
> option. In
  addition you must ensure <A
HREF="ref.dba.html#dba.installation"
>support</A
>
  for an underlying database or you can use some sytem libraries.
 </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="dbm.runtime"
></A
>Runtime Configuration</H1
><P
>This extension has no configuration directives defined in <TT
CLASS="filename"
>php.ini</TT
>.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="dbm.resources"
></A
>Resource Types</H1
><P
>&#13;     The function <A
HREF="function.dbmopen.html"
><B
CLASS="function"
>dbmopen()</B
></A
> returns an database identifier
     which is used by the other dbm-functions.
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="dbm.constants"
></A
>Predefined Constants</H1
><P
>This extension has no constants defined.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="dbm.examples"
></A
>Examples</H1
><P
>&#13;    <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN17440"
></A
><P
><B
>Example 1. DBM example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>$dbm = dbmopen ("lastseen", "w");
if (dbmexists ($dbm, $userid)) {
    $last_seen = dbmfetch ($dbm, $userid);
} else {
    dbminsert ($dbm, $userid, time());
}
do_stuff();
dbmreplace ($dbm, $userid, time());
dbmclose ($dbm);</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
   </P
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="function.dblist.html"
>dblist</A
>&nbsp;--&nbsp;
     Describes the DBM-compatible library being used
    </DT
><DT
><A
HREF="function.dbmclose.html"
>dbmclose</A
>&nbsp;--&nbsp;Closes a dbm database</DT
><DT
><A
HREF="function.dbmdelete.html"
>dbmdelete</A
>&nbsp;--&nbsp;
     Deletes the value for a key from a DBM database
    </DT
><DT
><A
HREF="function.dbmexists.html"
>dbmexists</A
>&nbsp;--&nbsp;
     Tells if a value exists for a key in a DBM database
    </DT
><DT
><A
HREF="function.dbmfetch.html"
>dbmfetch</A
>&nbsp;--&nbsp;
     Fetches a value for a key from a DBM database
    </DT
><DT
><A
HREF="function.dbmfirstkey.html"
>dbmfirstkey</A
>&nbsp;--&nbsp;
     Retrieves the first key from a DBM database
    </DT
><DT
><A
HREF="function.dbminsert.html"
>dbminsert</A
>&nbsp;--&nbsp;
     Inserts a value for a key in a DBM database
    </DT
><DT
><A
HREF="function.dbmnextkey.html"
>dbmnextkey</A
>&nbsp;--&nbsp;
     Retrieves the next key from a DBM database</DT
><DT
><A
HREF="function.dbmopen.html"
>dbmopen</A
>&nbsp;--&nbsp;Opens a DBM database</DT
><DT
><A
HREF="function.dbmreplace.html"
>dbmreplace</A
>&nbsp;--&nbsp;
     Replaces the value for a key in a DBM database
    </DT
></DL
></DIV
></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.dbase-replace-record.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.dblist.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>dbase_replace_record</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>dblist</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>