Skip to content
/ ADOdb Public

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.

License

Notifications You must be signed in to change notification settings

ADOdb/ADOdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e7256ad · Apr 8, 2025
Apr 16, 2024
Mar 22, 2025
Mar 22, 2025
Mar 22, 2025
Aug 25, 2024
Dec 23, 2024
May 22, 2023
Jan 25, 2025
May 18, 2023
Dec 23, 2024
Dec 23, 2024
Mar 13, 2021
Mar 8, 2018
Oct 28, 2022
Jun 8, 2022
Dec 19, 2020
Aug 19, 2021
Feb 27, 2023
Mar 22, 2024
Mar 22, 2024
Dec 23, 2024
Mar 22, 2025
Aug 16, 2021
Jun 12, 2023
Jun 12, 2023
Jun 10, 2023
Dec 15, 2024
Apr 15, 2023
Dec 23, 2024
Aug 16, 2021
Aug 16, 2021
Dec 23, 2024
Dec 23, 2024
Dec 23, 2024
Apr 8, 2025
Mar 20, 2023
Aug 16, 2021
Jan 16, 2022
Aug 16, 2021
Aug 16, 2021
Jan 25, 2025
May 12, 2023
Aug 5, 2013
Jan 12, 2020

Repository files navigation

ADOdb Library for PHP

Join chat on Gitter SourceForge Downloads Shield Packagist Downloads Shield

(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: https://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.

About

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.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published