Comunitatea PHP Romania
 

 
DBM Functions [deprecated]

XIX. 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ã: However, dbm support is deprecated and you are encouraged to use the Database (dbm-style) abstraction layer functions instead.

Notã: This extension has been removed as of PHP 5 and moved to the PECL repository.

Necesități

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

Instalare

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.

Configurare la rulare

Această extensie nu definește directive de configurare.

Tipuri de resurse

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

Constante predefinite

Această extensie nu definește constante.

Exemple

Exemplu 1. DBM example

<?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);

?>

Cuprins
dblist --  Describes the DBM-compatible library being used
dbmclose -- Closes a dbm database
dbmdelete --  Deletes the value for a key from a DBM database
dbmexists --  Tells if a value exists for a key in a DBM database
dbmfetch --  Fetches a value for a key from a DBM database
dbmfirstkey --  Retrieves the first key from a DBM database
dbminsert --  Inserts a value for a key in a DBM database
dbmnextkey --  Retrieves the next key from a DBM database
dbmopen -- Opens a DBM database
dbmreplace --  Replaces the value for a key in a DBM database

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
acasa , in pat
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
Mascka Mascka
Braila
raul_ raul_
whooper whooper
Toronto ON
mihaitha mihaitha
Sibiu
gabysolomon gabysolomon
Bacau
oriceon oriceon
Constanta
garlicinicolae garlicinicolae

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Blogs Forum | Cheap Magazines | Free Ringtone | Online Advertising | Personal Loans
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis