Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ADOdb is a PHP database class library to provide more powerful abstractions for performing queries and managing databases. ADOdb also hides the differences between the different databases so you can easily switch dbs without changing code.
PHP XSLT Other

Improve documentation of fetch mode and assoc case

Update comments in the code as well as the documentation to describe
ADODB_FETCH_* and ADODB_ASSOC_CASE_ constants.

Added description of each case and usage hints.
latest commit 93f1d86e6b
@dregad dregad authored
Failed to load latest commit information.
contrib Remove closing php tag
cute_icons_for_site Reorg: ADOdb5 (master) branch
datadict postgres: Fix AlterColumnSQL when updating multiple columns
docs Improve documentation of fetch mode and assoc case
drivers Coding guidelines and whitespace
lang Convert file adodb-th.inc.php from TIS-620 to UTF-8
pear Bump version to 5.20dev
perf Bump version to 5.20dev
replicate Remove closing php tag
scripts buildrelease.py: don't copy the main README file
session adodb-session2.php open method fails when it shouldn't
tests Bump version to 5.20dev
xsl Reorg: ADOdb5 (master) branch
.gitattributes Added original release build script
.gitignore .gitignore: Add Netbeans IDE project
README.md Warning about Associative fetch mode issue in v5.19
adodb-active-record.inc.php Whitespace and coding guidelines
adodb-active-recordx.inc.php Active record: fix inability to set values from 0 to null
adodb-csvlib.inc.php Suppress PHP warning during unlink in adodb_write_file()
adodb-datadict.inc.php Bump version to 5.20dev
adodb-error.inc.php Bump version to 5.20dev
adodb-errorhandler.inc.php Bump version to 5.20dev
adodb-errorpear.inc.php Bump version to 5.20dev
adodb-exceptions.inc.php Fix array to string conversion notice
adodb-iterator.inc.php Bump version to 5.20dev
adodb-lib.inc.php Add support for pagination with complex queries
adodb-memcache.lib.inc.php memcache: include_once() to avoid error with PHPUnit
adodb-pager.inc.php Bump version to 5.20dev
adodb-pear.inc.php Define DB_AUTOQUERY_* constants in main include
adodb-perf.inc.php Fix further broken links and remove some obsolete material
adodb-php4.inc.php Bump version to 5.20dev
adodb-time.inc.php Fix further broken links and remove some obsolete material
adodb-xmlschema.inc.php Remove closing php tag
adodb-xmlschema03.inc.php Follow-up fix for #92: remove extra line
adodb.inc.php Improve documentation of fetch mode and assoc case
composer.json Fix syntax error in composer.json
license.txt Reorg: ADOdb5 (master) branch
pivottable.inc.php Bump version to 5.20dev
rsfilter.inc.php Bump version to 5.20dev
server.php Bump version to 5.20dev
toexport.inc.php fix exception for calling implode with NULL parameter
tohtml.inc.php Bump version to 5.20dev
xmlschema.dtd Reorg: ADOdb5 (master) branch
xmlschema03.dtd Reorg: ADOdb5 (master) branch

README.md

ADODB Library for PHP5

(c) 2000-2014 John Lim (jlim@natsoft.com)

Released under both BSD and GNU Lesser GPL library license. This means you can use it in proprietary products.

Home page: http://adodb.sourceforge.net/

WARNING: known issue with Associative Fetch Mode in ADOdb v5.19
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 docs directory for library documentation and examples.

  • Main documentation: docs-adodb.htm. Query, update and insert records using a portable API.
  • Data dictionary docs: docs-datadict.htm. Describes how to create database tables and indexes in a portable manner.
  • Database performance monitoring docs: docs-perf.htm. Allows you to perform health checks, tune and monitor your database.
  • Database-backed session docs: docs-session.htm.

There is also a tutorial tute.htm that contrasts ADOdb code with 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.

Feature Requests and Bug Reports

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.

Something went wrong with that request. Please try again.