ADOdb is a PHP database class library that provides powerful abstractions for performing queries and managing databases. ADOdb also hides the differences between DB engines so you can easily switch them without changing your code.
PHP XSLT Python Batchfile
Latest commit 4a7ed2e Jun 15, 2017 @HaaseIT HaaseIT committed with dregad PHPDoc and visibility for Execute()
Changed tabs in annotations to spaces

Fixes #345
Permalink
Failed to load latest commit information.
contrib Remove closing php tag Feb 24, 2014
cute_icons_for_site Reorg: ADOdb5 (master) branch Aug 5, 2013
datadict method ChangeTableSQL is incompatible with parent method, see #338 May 13, 2017
docs Merge branch 'hotfix/5.20.9' Dec 21, 2016
drivers Ensure that the bind array is numeric, see #336 May 8, 2017
lang Add Indonesian translation (#293) Dec 17, 2016
pear Bump version to 5.21.0-dev Dec 21, 2016
perf Coding guidelines: remove { } in switch default Jan 10, 2016
replicate Fix#139: Remove PHP 4 Constructors Aug 11, 2015
scripts upload: handle username as an option Dec 17, 2016
session Driver defaults to mysql, which is no longer valid Aug 19, 2016
tests Added test script for mssqlnative driver Dec 17, 2016
xsl Reorg: ADOdb5 (master) branch Aug 5, 2013
.gitattributes Added original release build script Aug 5, 2013
.gitignore .gitignore: exclude PHPStorm files Mar 31, 2016
.mailmap Add .mailmap file for clean shortlog Aug 11, 2015
LICENSE.md Add Markdown formatting and improve layout Nov 28, 2015
README.md README: Added Sourceforge download badge Mar 30, 2016
adodb-active-record.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-active-recordx.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-csvlib.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-datadict.inc.php A user-defined default Metatype is now available Jan 31, 2016
adodb-error.inc.php Firebird driver uses ibase error mappings Feb 26, 2016
adodb-errorhandler.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-errorpear.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-exceptions.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-iterator.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-lib.inc.php Remove references to ADOdb Extension Oct 11, 2016
adodb-memcache.lib.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-pager.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-pear.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-perf.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-php4.inc.php Bump version to 5.21.0-dev Dec 21, 2016
adodb-time.inc.php Add week of year support in date library Apr 27, 2016
adodb-xmlschema.inc.php xml: remove calls to 'unset($this)' (PHP 7.1 compatibility) Aug 2, 2016
adodb-xmlschema03.inc.php xml: support table 'opt' attribute with mysqli Sep 14, 2016
adodb.inc.php PHPDoc and visibility for Execute() Jun 15, 2017
composer.json Composer: update PHP require dependency Sep 7, 2016
pivottable.inc.php Bump version to 5.21.0-dev Dec 21, 2016
rsfilter.inc.php Bump version to 5.21.0-dev Dec 21, 2016
server.php Bump version to 5.21.0-dev Dec 21, 2016
toexport.inc.php Bump version to 5.21.0-dev Dec 21, 2016
tohtml.inc.php Bump version to 5.21.0-dev Dec 21, 2016
xmlschema.dtd Reorg: ADOdb5 (master) branch Aug 5, 2013
xmlschema03.dtd Reorg: ADOdb5 (master) branch Aug 5, 2013

README.md

ADOdb Library for PHP5

Join chat on Gitter Download ADOdb

(c) 2000-2013 John Lim (jlim@natsoft.com)
(c) 2014 Damien Regad, Mark Newnham and the ADOdb community

Released under both BSD 3-Clause and GNU Lesser GPL library 2.1 licenses.
This means you can use it in proprietary products; see License for details.

Home page: http://adodb.org/

WARNING: known issue with Associative Fetch Mode in ADOdb v5.19 -- PLEASE UPGRADE TO v5.20 !
When fetching data in Associative mode (i.e. when $ADODB_FETCH_MODE is set to ADODB_FETCH_ASSOC), recordsets do not return any data (empty strings) when using some database drivers. The problem has been reported on MSSQL, Interbase and Foxpro, but possibly affects other drivers as well; all drivers derived from the above are also impacted. For further details, please refer to Issue #20.

Introduction

PHP's database access functions are not standardized. This creates a need for a database class library to hide the differences between the different databases (encapsulate the differences) so we can easily switch databases.

The library currently supports MySQL, Interbase, Sybase, PostgreSQL, Oracle, Microsoft SQL server, Foxpro ODBC, Access ODBC, Informix, DB2, Sybase SQL Anywhere, generic ODBC and Microsoft's ADO.

We hope more people will contribute drivers to support other databases.

Installation

Unpack all the files into a directory accessible by your web server.

To test, try modifying some of the tutorial examples. Make sure you customize the connection settings correctly.

You can debug using:

<?php
include('adodb/adodb.inc.php');

$db = ADONewConnection($driver); # eg. 'mysql' or 'oci8'
$db->debug = true;
$db->Connect($server, $user, $password, $database);
$rs = $db->Execute('select * from some_small_table');
print "<pre>";
print_r($rs->GetRows());
print "</pre>";

Documentation and Examples

Refer to the ADOdb website for library documentation and examples. The documentation can also be downloaded for offline viewing.

There is also a tutorial that contrasts ADOdb code with PHP native MySQL code.

Files

  • adodb.inc.php is the library's main file. You only need to include this file.
  • adodb-*.inc.php are the database specific driver code.
  • adodb-session.php is the PHP4 session handling code.
  • test.php contains a list of test commands to exercise the class library.
  • testdatabases.inc.php contains the list of databases to apply the tests on.
  • Benchmark.php is a simple benchmark to test the throughput of a SELECT statement for databases described in testdatabases.inc.php. The benchmark tables are created in test.php.

Support

To discuss with the ADOdb development team and users, connect to our Gitter chatroom using your Github credentials.

Please report bugs, issues and feature requests on Github:

https://github.com/ADOdb/ADOdb/issues

You may also find legacy issues in

However, please note that they are not actively monitored and should only be used as reference.