Skip to content
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 Other
Branch: master
Clone or download

Latest commit

mnewnham Retrieve error messages early before connection close #614
Error messages from last error are lost if the
connection is closed before retrieval
Latest commit 65b0e14 Jun 1, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
contrib Remove closing php tag Feb 24, 2014
datadict Fix PHPDoc Jan 12, 2020
docs Merge branch 'hotfix/5.20' (5.20.17) Mar 31, 2020
drivers Retrieve error messages early before connection close #614 Jun 1, 2020
lang Fix typos in german error messages Jan 4, 2020
pear Codespell assisted typo cleaning Nov 12, 2019
perf PHPDoc for perf_mysql::tables() Jan 3, 2020
replicate Replace each() with foreach for PHP7.2 compatibility Mar 29, 2018
scripts Codespell assisted typo cleaning Nov 12, 2019
session Fix descr tag in session schema XML (#595) Jan 12, 2020
tests Remove PHP version checks from test scripts Jan 24, 2020
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 Mar 25, 2019
adodb-active-record.inc.php Fix native mode casing issue, see #610 Mar 28, 2020
adodb-active-recordx.inc.php Fix indentation Jan 24, 2020
adodb-csvlib.inc.php Codespell assisted typo cleaning Nov 12, 2019
adodb-datadict.inc.php Replace call to _array_change_key_case see #587 Jan 6, 2020
adodb-error.inc.php Fix indentation Apr 11, 2019
adodb-errorhandler.inc.php Reset version to avoid merge conflicts Mar 31, 2020
adodb-errorpear.inc.php Codespell assisted typo cleaning Nov 12, 2019
adodb-exceptions.inc.php PHPDoc Nov 23, 2019
adodb-iterator.inc.php Reset version to avoid merge conflicts Mar 31, 2020
adodb-lib.inc.php fix #572, also quote fieldnames when value set null, fix indentations ( Jan 9, 2020
adodb-loadbalancer.inc.php More whitespace, break long lines Jan 25, 2020
adodb-memcache.lib.inc.php Merge branch 'hotfix/5.20' (v5.20.13) Aug 6, 2018
adodb-pager.inc.php Codespell assisted typo cleaning Nov 12, 2019
adodb-pear.inc.php Codespell assisted typo cleaning Nov 12, 2019
adodb-perf.inc.php Removed multiple outdated version checks Jan 24, 2020
adodb-php4.inc.php Reset version to avoid merge conflicts Mar 31, 2020
adodb-time.inc.php Reuse $hrs instead of calling floor() again Jan 24, 2020
adodb-xmlschema.inc.php Don't bother with magic quotes when not available Mar 30, 2018
adodb-xmlschema03.inc.php XML: add support for 'DESCR' tags for tables/fields Jan 9, 2020
adodb.inc.php Merge remote-tracking branch 'origin/hotfix/5.20' Jan 30, 2020
composer.json Merge branch 'hotfix/5.20.10' Jan 30, 2018
pivottable.inc.php Reset version to avoid merge conflicts Mar 31, 2020
rsfilter.inc.php Reset version to avoid merge conflicts Mar 31, 2020
server.php proxy server: minor adjustments Jan 4, 2020
toexport.inc.php Reset version to avoid merge conflicts Mar 31, 2020
tohtml.inc.php Reset version to avoid merge conflicts Mar 31, 2020
xmlschema.dtd Reorg: ADOdb5 (master) branch Aug 5, 2013
xmlschema03.dtd #PCDATA makes XML/DTD validator happy (#595) Jan 12, 2020

README.md

ADOdb Library for PHP

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.

You can’t perform that action at this time.