Download Source code Documentation Support Changelog FAQ ADOdb is a database abstraction library for PHP It currently supports an amazing number of databases, thanks to the wonderful ADOdb community: MySQL, PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, Foxpro, Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP, and generic ODBC, ODBTP. The Sybase, Informix, FrontBase and PostgreSQL, Netezza, LDAP, ODBTP drivers are community contributions. Here is the complete list of drivers. Many popular web applications such as ACID, Zikula/PostNuke, phpWiki, Mambo, PHP GACL, TikiWiki, eGroupWare and phpLens App Server are using ADOdb as their database abstraction layer. Some reasons why ADOdb is popular include:
PHP Code Samplesinclude('/path/to/adodb.inc.php'); Other things you can try include: # Updating tables $ok = $DB->Execute("update table set col1=? where key=?",array($colval, $key)); # retrieving data shortcuts $val = $DB->GetOne("select col from table where key='John'"); $row = $DB->GetRow("select col from table where key='John'"); $arr = $DB->GetAll("select col from table"); $arr = $DB->GetAssoc("select key,col from table"); # returns associative array $key=>col # Retrieve high speed cached recordsets (cached for 3600 secs)And there are more connection examples showing you how to connect to SQLite, Oracle, PostgreSQL, Microsoft SQL Server, MS Access, LDAP, Interbase/Firebird, etc. PHP5 SupportADOdb has full PHP5 support, including SPL and exception support. For example, you can do this in PHP5:$rs = $DB->Execute("select * from table");If you include the following adodb-exceptions.inc.php file, then ADOdb will throw exceptions when an error occurs: include("/path/to/adodb-exceptions.inc.php"); DownloadRequirements: PHP 5.0 or later. Installation: Unpack files into a directory. Try the above sample code, adjusting the connection parameters to suit your database server, and modify the sql to match your tables. Debugging: Set your connection's debug property, e.g. $DB->debug=true; if you are having problems. It will output lots of useful status and error messages. ADOdb Documentation
Data Dictionary for schema creation. Other Docs for PHP versionThe documents in this section are maintained (or not, as the case may be) by their respective authors and are therefore potentially out of date or even obsolete.
MySQL Tutorial A couple excellent articles by icarus about ADOdb at MelonFire: Part 1 on Basics and Part 2 on Advanced ADOdb. TranslationsPHP documentation in other languages: and tutorials in: SupportBug reports, feature requests and questions should be filed on Github. To discuss with the ADOdb development team and users,
connect to our Gitter chatroom
using your Github credentials. The legacy ADOdb forums are still available in read-only mode for reference. © 2000-2013 John Lim (jlim#natsoft.com) © 2014 Damien Regad, Mark Newnham and the ADOdb community |