Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : DBM Functions [deprecated] : dbminsert

dbminsert

Inserts a value for a key in a DBM database (PHP 4)
int dbminsert ( resource dbm_identifier, string key, string value )

Adds the value to the database with the specified key.

Parameters

dbm_identifier

The DBM link identifier, returned by dbmopen().

key

The added key

value

The added key value

Return Values

Returns -1 if the database was opened read-only, 0 if the insert was successful, and 1 if the specified key already exists. (To replace the value, use dbmreplace().)

Code Examples / Notes » dbminsert

schoch4

In PHP 3, the key is passed as a C string with its length set to its strlen.  This can be a problem if you want to use the DBM file as an AuthDBMUserFile for apache with NETSCAPE_DBM_COMPAT defined.  In that case, apache needs a trailing NULL on the key, which this function can't do.

Change Language


Follow Navioo On Twitter
dblist
dbmclose
dbmdelete
dbmexists
dbmfetch
dbmfirstkey
dbminsert
dbmnextkey
dbmopen
dbmreplace
eXTReMe Tracker