psBDB_keyList() Returns a list of keys
Description:
This will return a list of all keys from a Berkeley DB file
Usage:
psBDB_keyList($dbFile); $dbFile = file name of the db file
Example:
$aryList = psBDB_keyList("/tmp/people.db");
Code:
// this reads the value for a key function psBDB_keyList($dbFile) { $res = array(); $db = dba_open($dbFile, "cl" ,"db4"); if ($db !== false) { $key = dba_firstkey($db); while ($key !== false) { $res[] = $key; $key = dba_nextkey($db); } dba_close($db); } return $res; }
Changlelog:
05-09-2019 v2.24 function added
|