PHP Wysardry
PHP Manual

PHP documentation.



Home / PHP / Manual / ...



PHP Manual
Prev Next

XXII. DB++ Functions

Warning

This extension is EXPERIMENTAL. The behaviour of this extension, including the names of its functions, and anything else documented about this extension may change in a future release of PHP without notice. Be warned and use this extension at your own risk.

DB++ Database Functions

db++, made by the german company Concept asa, is a relational database system with high performance and low memory and disk usage in mind. While providing SQL as an additional language interface it is not really a SQL database in the first place but provides its own AQL query language which is much more influenced by the relational algebra then SQL is.

Concept asa always had an interest in supporting open source languages, db++ has had Perl and Tcl call interfaces for years now and uses Tcl as its internal stored procedure language.

Requirements

You need the development libraries and header files included in every db++ installation archive. Concept asa provides additional documentation and Demo versions of db++ for Linux, some other UNIX versions and Windows95/NT.

Installation

Creation and installation of this extension requires the db++ client libraries and header files to be installed on your system. You have to run configure with option --with-dbplus to build this extension.

configure looks for the client libraries and header files under the default paths /usr/dbplus, /usr/local/dbplus and /opt/dblus. If you have installed db++ in a different place you have add the installation path to the configure option like this: --with-dbplus=/your/installation/path.

db++ error codes

Table 1. DB++ Error Codes

PHP Constant db++ constant meaning
DBPLUS_ERR_NOERR ERR_NOERR Null error condition
DBPLUS_ERR_DUPLICATE ERR_DUPLICATE Tried to insert a duplicate tuple
DBPLUS_ERR_EOSCAN ERR_EOSCAN End of scan from rget()
DBPLUS_ERR_EMPTY ERR_EMPTY Relation is empty (server)
DBPLUS_ERR_CLOSE ERR_CLOSE The server can't close
DBPLUS_ERR_WLOCKED ERR_WLOCKED The record is write locked
DBPLUS_ERR_LOCKED ERR_LOCKED Relation was already locked
DBPLUS_ERR_NOLOCK ERR_NOLOCK Relation cannot be locked
DBPLUS_ERR_READ ERR_READ Read error on relation
DBPLUS_ERR_WRITE ERR_WRITE Write error on relation
DBPLUS_ERR_CREATE ERR_CREATE Create() system call failed
DBPLUS_ERR_LSEEK ERR_LSEEK Lseek() system call failed
DBPLUS_ERR_LENGTH ERR_LENGTH Tuple exceeds maximum length
DBPLUS_ERR_OPEN ERR_OPEN Open() system call failed
DBPLUS_ERR_WOPEN ERR_WOPEN Relation already opened for writing
DBPLUS_ERR_MAGIC ERR_MAGIC File is not a relation
DBPLUS_ERR_VERSION ERR_VERSION File is a very old relation
DBPLUS_ERR_PGSIZE ERR_PGSIZE Relation uses a different page size
DBPLUS_ERR_CRC ERR_CRC Invalid crc in the superpage
DBPLUS_ERR_PIPE ERR_PIPE Piped relation requires lseek()
DBPLUS_ERR_NIDX ERR_NIDX Too many secondary indices
DBPLUS_ERR_MALLOC ERR_MALLOC Malloc() call failed
DBPLUS_ERR_NUSERS ERR_NUSERS Error use of max users
DBPLUS_ERR_PREEXIT ERR_PREEXIT Caused by invalid usage
DBPLUS_ERR_ONTRAP ERR_ONTRAP Caused by a signal
DBPLUS_ERR_PREPROC ERR_PREPROC Error in the preprocessor
DBPLUS_ERR_DBPARSE ERR_DBPARSE Error in the parser
DBPLUS_ERR_DBRUNERR ERR_DBRUNERR Run error in db
DBPLUS_ERR_DBPREEXIT ERR_DBPREEXIT Exit condition caused by prexit() * procedure
DBPLUS_ERR_WAIT ERR_WAIT Wait a little (Simple only)
DBPLUS_ERR_CORRUPT_TUPLE ERR_CORRUPT_TUPLE A client sent a corrupt tuple
DBPLUS_ERR_WARNING0 ERR_WARNING0 The Simple routines encountered a non fatal error which was corrected
DBPLUS_ERR_PANIC ERR_PANIC The server should not really die but after a disaster send ERR_PANIC to all its clients
DBPLUS_ERR_FIFO ERR_FIFO Can't create a fifo
DBPLUS_ERR_PERM ERR_PERM Permission denied
DBPLUS_ERR_TCL ERR_TCL TCL_error
DBPLUS_ERR_RESTRICTED ERR_RESTRICTED Only two users
DBPLUS_ERR_USER ERR_USER An error in the use of the library by an application programmer
DBPLUS_ERR_UNKNOWN ERR_UNKNOWN  
Table of Contents
dbplus_add -- Add a tuple to a relation
dbplus_aql -- Perform AQL query
dbplus_chdir -- Get/Set database virtual current directory
dbplus_close -- Close a relation
dbplus_curr -- Get current tuple from relation
dbplus_errcode --  Get error string for given errorcode or last error
dbplus_errno -- Get error code for last operation
dbplus_find -- Set a constraint on a relation
dbplus_first -- Get first tuple from relation
dbplus_flush -- Flush all changes made on a relation
dbplus_freealllocks -- Free all locks held by this client
dbplus_freelock -- Release write lock on tuple
dbplus_freerlocks -- Free all tuple locks on given relation
dbplus_getlock -- Get a write lock on a tuple
dbplus_getunique -- Get a id number unique to a relation
dbplus_info -- ???
dbplus_last -- Get last tuple from relation
dbplus_lockrel -- Request write lock on relation
dbplus_next -- Get next tuple from relation
dbplus_open -- Open relation file
dbplus_prev -- Get previous tuple from relation
dbplus_rchperm -- Change relation permissions
dbplus_rcreate -- 
dbplus_rcrtexact -- 
dbplus_rcrtlike -- 
dbplus_resolve -- Resolve host information for relation
dbplus_rkeys -- Specify new primary key for a relation
dbplus_restorepos -- ???
dbplus_ropen -- Open relation file local
dbplus_rquery -- Perform local (raw) AQL query
dbplus_rrename -- Rename a relation
dbplus_rsecindex --  Create a new secondary index for a relation
dbplus_runlink -- Remove relation from filesystem
dbplus_rzap -- Remove all tuples from relation
dbplus_savepos -- ???
dbplus_setindex -- ???
dbplus_setindexbynumber -- ???
dbplus_sql -- Perform SQL query
dbplus_tcl -- Execute TCL code on server side
dbplus_tremove -- Remove tuple and return new current tuple
dbplus_undo -- ???
dbplus_undoprepare -- ???
dbplus_unlockrel -- Give up write lock on relation
dbplus_unselect -- Remove a constraint from relation
dbplus_update -- Update specified tuple in relation
dbplus_xlockrel -- Request exclusive lock on relation
dbplus_xunlockrel -- Free exclusive lock on relation

Prev Manual Home Next
dbx_compare Up dbplus_add
Site Menu

Amazon.ca
Amazon.com
Amazon.co.uk



Most recently updated on 11 May, 2003

Home / PHP / Manual / ...



Please feel free to contact us with any comments or suggestions
PHP Manual
PHP Wysardry

This site is hosted by Spaceports