DBHASH_EXIST
NAME
dbhash_exist - Check if a key exist in the database
SYNOPSIS
dbhash_exist (db:pointer, key:string);
DESCRIPTION
This function check a key from the database.
PARAMETERS
- db
- Pointer to database
- key
- Key
RETURN
boolean
MODULES
To use this module, you must specify the following in /usr/local/website/site.conf:
Module hash {
Library : "/usr/local/lib/libsndbhash.so"
Init : "sndbhash_init"
}
EXAMPLES
hash = dbhash_open("/hash/test.db");
ret = dbhash_put(db:hash,key:"cookie",value:"aurhfqiuwrhf");
dbhash_get(db:hash,key:"cookie");
if dbhash_exist(db:hash,key:"cookie") then ... endif
dbhash_close(hash);
SEE ALSO
{{ include("includes/dbhash.sn") }}
AUTHOR
Written by Pierre Laplante, <laplante@sednove.com>
MODIFICATIONS
1.0 2015-02-09 21:24:14 laplante@sednove.com
Edit