You are here: Home // Database (dbm-style) abstraction layer functions
dba_sync
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_sync – Synchronize database
Description
bool dba_sync (int handle)
dba_sync() synchronizes the database specified by handle. This will probably trigger a physical write to disk, if supported.
handle is a database handle returned by dba_open().
dba_sync() returns true or false, if the synchronization succeeds or fails,
dba_replace
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_replace – Replace or insert entry
Description
bool dba_replace (string key, string value, int handle)
dba_replace() replaces or inserts the entry described with key and value into the database specified by handle.
key is the key of the entry to be inserted.
value is the value to be inserted.
handle is a database handle returned by dba_open().
dba_replace()
dba_optimize
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_optimize – Optimize database
Description
bool dba_optimize (int handle)
dba_optimize() optimizes the underlying database specified by handle.
handle is a database handle returned by dba_open().
dba_optimize() returns true or false, if the optimization succeeds or fails, respectively.
dba_open
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_open – Open database
Description
int dba_open (string path, string mode, string handler [, ...])
dba_open() establishes a database instance for path with mode using handler.
path is commonly a regular path in your filesystem.
mode is “r” for read access, “w” for read/write access to an already existing database,
dba_popen
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_popen – Open database persistently
Description
int dba_popen (string path, string mode, string handler [, ...])
dba_popen() establishes a persistent database instance for path with mode using handler.
path is commonly a regular path in your filesystem.
mode is “r” for read access, “w” for read/write access to
dba_nextkey
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_nextkey – Fetch next key
Description
string dba_nextkey (int handle)
dba_nextkey() returns the next key of the database specified by handle and increments the internal key pointer.
handle is a database handle returned by dba_open().
dba_nextkey() returns the key or false depending on whether it succeeds or fails, respectively.
dba_insert
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_insert – Insert entry
Description
bool dba_insert (string key, string value, int handle)
dba_insert() inserts the entry described with key and value into the database specified by handle. It fails, if an entry with the same key already exists.
key is the key of the entry to be inserted.
value is the value to be inserted.
handle is a
dba_firstkey
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_firstkey – Fetch first key
Description
string dba_firstkey (int handle)
Dba_firstkey() returns the first key of the database specified by handle and resets the internal key pointer. This permits a linear search through the whole database.
Handle is a database handle returned by dba_open().
Dba_firstkey() returns the key or false
dba_fetch
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_fetch – Fetch data specified by key
Description
string dba_fetch (string key, int handle)
Dba_fetch() fetches the data specified by key from the database specified with handle.
Key is the key the data is specified by.
Handle is a database handle returned by dba_open().
Dba_fetch() returns the associated string or false, if the key/data
dba_exists
(PHP3 >= 3.0.8, PHP4 >= 4.0b2)
dba_exists – Check whether key exists
Description
bool dba_exists (string key, int handle)
Dba_exists() checks whether the specified key exists in the database specified by handle.
Key is the key the check is performed for.
Handle is a database handle returned by dba_open().
Dba_exists() returns true or false, if the key is found or















































