Recommend this page to a friend!
  Info   View files (40)   Download .zip   Reputation   Support forum (4)   Blog    
Ratings Unique User Downloads Download Rankings
67%Total: 8,314 All time: 196 This week: 446
Version License Categories
anydb 1.0GNU Lesser Genera...Databases
Description Author

If you believe that database abstraction is a good think, but you don't want to
join the religous fights about the best one out there, then we have a common

This abstract wrapper class provides easy and simple class methods to access the
most important db function. It implements the functionality for databases like
MYSQL, POSTGRESQL or SQLITE. It provides a wrapper for PEAR, PHPLIB, ADOdb and
METABASE and enables you to switch between these db abstraction layers with only
changing a single line of code. You gain the possibility to develop similar code
for more than 15 different databases.

Detailed documentation for all the complete interface exists.

A ligtweight interface supports the most common tasks in an easy and efficent
way, such as sending queries and fetching result sets or single variables.

Additional classes provide tools for accessing database data, dumping
information in html tables, exporting db content to CSV-files or as SQL
statements or presenting database content pagewise (e.g. for search results).

// Interface of version 1.0:

function Constructor($libraryPath, $dbType, $preferredResType = ASSOCIATIVE_ARRAY)
function connect($host, $db, $user, $password)
function disconnect()
function query($query)
function getNext($resultType = PREDEFINED_VALUE)
function getAll($resultType = PREDEFINED_VALUE)
function getValue()
function getColumn($resultType = PREDEFINED_VALUE)
function execute($query, $resultType = PREDEFINED_VALUE)
function free()
function numRows()
function affectedRows()
function getIdentifier()
function getTables()
function escapeStr()

string $host
string $database
string $user
string $password

integer $prefResType
string $lastQuery
string $error
string $db
string $result

Picture of L
Name: L <contact>
Classes: 13 packages by
Country: Germany Germany
Age: 46
All time rank: 516 in Germany Germany
Week rank: 259 10 in Germany Germany

File Role Description
addon (4 files)
base (3 files)
dbs (7 files)
docs (1 file)
examples (18 files, 1 directory)
test (2 files)
anyDB.php Class class for instancating instances of AbstractDB
changes.txt Class changes for version 1.2
interface.txt Doc. interface description

  Files  /  addon  
File Role Description
   DBHelper.php Class utility class
   Exporter.php Class utility class to export db content
   PageWidget.php Class utility class
   QueryHelper.php Class utility class

  Files  /  base  
File Role Description
   AbstractDB.php Class abstract wrapper class
   BasicDB.php Class basic implementation
   UtilityClass.php Class abstract base class

  Files  /  dbs  
File Role Description
   ADOdbDB.php Class Implementation for ADOdb
   MetabaseDB.php Class Implementation for METABASE
   MysqlDB.php Class Implementation for native php mysql functions
   OdbcDB.php Class database layer for ODBC
   PearDB.php Class Implementation for PEAR
   PostgresDB.php Class Implementation for native php postgres functions
   SQLite.php Class layer for SQLite

  Files  /  docs  
File Role Description
   readme.html Doc. short overview

  Files  /  examples  
File Role Description
table_data (2 files) Conf. include file for connecting
   createPageView.php Example example Example include to disconnect
   dumpAll.php Example example
   dumpColumn.php Example example
   dumpDropdown.php Example examples
   dumpNext.php Example example
   exportToCsv.php Example export data in csv format
   exportToSql.php Example dumps data as sql queries
   getAll.php Example example
   getAllExec.php Example exmample
   getColumn.php Example example
   getNext.php Example example
   getNextBoth.php Example example
   getNextNumeric.php Example example
   getTables.php Example display all tables in current db
   getValue.php Example get a single value
   insert.php Example example

  Files  /  examples  /  table_data  
File Role Description
   users.dbx Conf. dbx database definition
   users.mysql Conf. mysql database definition

  Files  /  test  
File Role Description Example example include
   test1.php Example tests all db functions

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:196
This week:446
 User Ratings  
 All time

For more information send a message to info at phpclasses dot org.