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.
Clone or download
mnewnham constant ADODB_FORCE_NULL_AND_ZERO not honoured, see #447
Code missing from the _adodb_getupdatesql() method, added
Latest commit a51a426 Aug 9, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contrib Remove closing php tag Feb 24, 2014
datadict This release of the IBM DB2 driver is a full rewrite, based on the DB2 Jul 29, 2018
docs Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
drivers Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
lang Add Indonesian translation (#293) Dec 17, 2016
pear Reset version to avoid merge conflicts Aug 6, 2018
perf Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
replicate Replace each() with foreach for PHP7.2 compatibility Mar 29, 2018
scripts Exclude files and dirs from git archive Mar 8, 2018
session Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
tests Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
xsl Reorg: ADOdb5 (master) branch Aug 5, 2013
.gitattributes Exclude files and dirs from git archive Mar 8, 2018
.gitignore .gitignore: exclude PHPStorm files Mar 31, 2016
.mailmap Update mailmap Mar 8, 2018
LICENSE.md LICENCE: home page link, line breaks on copyright Jan 30, 2018
README.md Update README.md Aug 6, 2018
adodb-active-record.inc.php Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
adodb-active-recordx.inc.php Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
adodb-csvlib.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-datadict.inc.php Replace each() with foreach for PHP7.2 compatibility Nov 25, 2017
adodb-error.inc.php Replace each() with foreach for PHP7.2 compatibility Nov 25, 2017
adodb-errorhandler.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-errorpear.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-exceptions.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-iterator.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-lib.inc.php constant ADODB_FORCE_NULL_AND_ZERO not honoured, see #447 Aug 9, 2018
adodb-memcache.lib.inc.php Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
adodb-pager.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-pear.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-perf.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-php4.inc.php Reset version to avoid merge conflicts Aug 6, 2018
adodb-time.inc.php Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
adodb-xmlschema.inc.php Don't bother with magic quotes when not available Mar 30, 2018
adodb-xmlschema03.inc.php Merge branch 'hotfix/5.20' Mar 30, 2018
adodb.inc.php Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
composer.json Merge branch 'hotfix/5.20.10' Jan 30, 2018
pivottable.inc.php Reset version to avoid merge conflicts Aug 6, 2018
rsfilter.inc.php Reset version to avoid merge conflicts Aug 6, 2018
server.php Reset version to avoid merge conflicts Aug 6, 2018
toexport.inc.php Reset version to avoid merge conflicts Aug 6, 2018
tohtml.inc.php Reset version to avoid merge conflicts Aug 6, 2018
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

The ADOdb Library is dual-licensed, released under both the BSD 3-Clause and the GNU Lesser General Public Licence (LGPL) v2.1 or, at your option, any later version. This means you can use it in proprietary products; see License for details.

Home page: http://adodb.org/

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, Firebird & Interbase, PostgreSQL, SQLite3, Oracle, Microsoft SQL Server, Foxpro ODBC, Access ODBC, Informix, DB2, Sybase, 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. 'mysqli' 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.