Informaţii de referinţă despre funcţii
PHP Manual

DBM Functions [deprecated]

Introducere

These functions allow you to store records stored in a dbm-style database. This type of database (supported by the Berkeley DB, » GDBM, 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).

Notă: DBM support is deprecated and you are encouraged to use the Database (dbm-style) abstraction layer functions instead.

Notă: This extension has been removed from PHP and is no longer available as of PHP 5.0.0.

Necesităţi

To use this functions you have to compile PHP with support for an underlying database. See the list of supported Databases.

Instalarea

In order to use these functions, you must compile PHP with dbm support by using the --with-db option. In addition you must ensure support for an underlying database or you can use some system libraries.

Configuraţia la rulare

Această extensie nu are directive de configurare definite în php.ini.

Tipurile resurselor

The function dbmopen() returns an database identifier which is used by the other dbm-functions.

Constante predefinite

Această extensie nu are constante definite.

Exemple

Example#1 DBM example

<?php

$dbm 
dbmopen("lastseen""w");
if (
dbmexists($dbm$userid)) {
    
$last_seen dbmfetch($dbm$userid);
} else {
    
dbminsert($dbm$useridtime());
}
do_stuff();
dbmreplace($dbm$useridtime());
dbmclose($dbm);

?>

Cuprins


Informaţii de referinţă despre funcţii
PHP Manual