| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- pre {
- background-color: #eee;
- padding: 0.75em 1.5em;
- font-size: 12px;
- font-family: "Lucida Console", "DejaVu Sans Mono", Courier, monospace;
- border: 1px solid #ddd;
- }
- body {
- background-color: #0066FF;
- }
- .style1 {
- font-family: Arial, Helvetica, sans-serif
- }
- .style2 {
- font-family: Arial, Helvetica, sans-serif;
- color: #FFFFFF;
- }
- </style>
- <title>ADOdb Database Abstraction Library for PHP</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- </head>
- <body>
- <table width="986" cellpadding=8 border="2" align="center" bordercolor="#999999">
- <tbody>
- <tr>
- <td bgcolor="#FFFFFF">
- <table border="0" cellpadding=2 width="100%">
- <tbody>
- <tr bgcolor="#000099">
- <td bordercolor="#FFFFFF" class="style2">
- <h2>ADOdb Database Abstraction Library for PHP</h2>
- <p>v5.20.3 - 01-Jan-2016</p>
- <td align="center" valign="center" bgcolor="#CCCCCC" class="style1"><img src="adodb.gif"></td>
- </tr>
- </tbody>
- </table>
- <p class="style1"> <font size="3">
- <a href="#download">Download</a>
- <a href="https://github.com/ADOdb/ADOdb">Source code</a>
- <a href="#docs">Documentation</a>
- <a href="#support">Support</a>
- <a href="https://github.com/ADOdb/ADOdb/blob/master/docs/changelog.md">Changelog</a>
- <a href="adodb-faq.html">FAQ</a> </font></p>
- <hr>
- <p class="style1">ADOdb is a database abstraction library for PHP</p>
- <p class="style1">It currently supports an amazing number of
- databases, thanks to the wonderful ADOdb community: <i>MySQL,
- PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, Foxpro,
- Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP, </i>and<i>
- generic ODBC, ODBTP</i>. The Sybase, Informix, FrontBase and
- PostgreSQL, Netezza, LDAP, ODBTP drivers are community contributions.
- Here is the <a href="docs-adodb.htm#drivers">complete
- list of drivers</a>. </p>
- <p class="style1"> Many popular web applications such as
- <a href="http://www.andrew.cmu.edu/%7Erdanyliw/snort/snortacid.html">ACID</a>,
- <a href="http://community.zikula.org">Zikula/PostNuke</a>,
- <a href="http://phpwiki.sourceforge.net/">phpWiki</a>,
- <a href="http://www.mamboserver.com/">Mambo</a>,
- <a href="http://phpgacl.sourceforge.net/">PHP GACL</a>,
- <a href="http://sourceforge.net/projects/tikiwiki">TikiWiki</a>,
- <a href="http://www.egroupware.org/">eGroupWare</a> and
- <a href="http://phplens.com/lens/">phpLens App Server</a>
- are using ADOdb as their database abstraction layer.
- Some reasons why ADOdb is popular include: </p>
- <ul class="style1">
- <li>Designed for <b>speed</b>. It is probably the fastest open
- source database abstraction library available for PHP. See <a
- href="http://phplens.com/lens/adodb/">benchmarks</a>.</li>
- <li>Provides <b>extensive portability support</b> such as date
- and type-handling and portable schema creation. See <a
- href="tips_portable_sql.htm">portable sql tips</a></li>
- <li>Support many <b>enterprise features</b> such as database
- backed sessions (with session expiry notification), SQL code
- generation, pivot tables, SELECT LIMIT emulation for all databases,
- performance monitoring.</li>
- <li><b>Easy to learn</b>, especially if you have Window's
- programming experience, as it uses many ADO conventions.</li>
- <li><b>Extensive QA</b>, every release is unit-tested on
- Access, MySQL, PostgreSQL, MS SQL, Oracle 11g.</li>
- <li><b>Mature</b>, continiously developed since August 2000.
- Has a <b>large community</b> of users. </li>
- <li>Powerful <strong>Active Record </strong>support. See <a href="docs-active-record.htm">docs</a>. </li>
- <li>Very <b>reasonable licensing</b> terms (BSD). This means
- that you can incorporate (and even compile) it into your software
- applications<b> royalty-free</b> without asking the author's
- permission, provided you include the
- <a href="https://github.com/ADOdb/ADOdb/blob/master/LICENSE.md">ADOdb Licence</a>
- in your release.
- Also dual-licensed (Lesser GPL v2.1). </li>
- </ul>
- <h3 class="style1">PHP Code Samples</h3>
- <pre>include('/path/to/adodb.inc.php');<br>$DB = NewADOConnection('mysql');<br>$DB->Connect($server, $user, $pwd, $db);<br><br><font
- color="#006600"># M'soft style data retrieval with binds</font>
- $rs = $DB->Execute("select * from table where key=?",array($key));
- while (!$rs->EOF) {
- print_r($rs->fields);
- $rs->MoveNext();
- }
- <font color="#006600"># PEAR style data retrieval</font>
- $rs = $DB->Execute("select * from table where key=123");
- while ($array = $rs->FetchRow()) {
- print_r($array);
- }
- <font color="#006600"># Alternative URI connection syntax:</font>
- $DB = NewADOConnection("<b>mysql://$user:$pwd@$server/$db?persist</b>");<br><br><font
- color="#006600"># No need for Connect or PConnect when using URI syntax</font>
- $ok = $DB->Execute("update atable set aval = 0");
- if (!$ok) mylogerr($DB->ErrorMsg());
- </pre>
- <p class="style1">Other things you can try include: </p>
- <pre><font color="#006600"># Updating tables</font>
- $ok = $DB->Execute("update table set col1=? where key=?",array($colval, $key));
- <font color="#006600"># retrieving data shortcuts</font>
- $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
- <font color="#006600"># Retrieve high speed cached recordsets (cached for 3600 secs)<br>
- # Cache directory defined in global $ADODB_CACHE_DIR. <br>
- # CacheGetOne, CacheRow, CacheGetAll all work</font>
- $rs = $DB->CacheExecute(3600, "select orgname from users where user='JOHN'");
- </pre>
- <span class="style1">And there are <a href="docs-adodb.htm#coding">more
- connection examples</a> showing you how to connect to
- <a href="docs-adodb.htm#sqlite">SQLite</a>,
- <a href="docs-adodb.htm#oci8">Oracle</a>,
- <a href="docs-adodb.htm#postgres">PostgreSQL</a>,
- <a href="docs-adodb.htm#odbc_mssql">Microsoft SQL Server</a>,
- <a href="docs-adodb.htm#access">MS Access</a>,
- <a href="docs-adodb.htm#ldap">LDAP</a>,
- <a href="docs-adodb.htm#ibase">Interbase/Firebird</a>,
- etc.
- </span>
- <h3 class="style1">PHP5 Support</h3>
- <span class="style1">ADOdb has full PHP5 support, including SPL and exception support. For
- example, you can do this in PHP5:
- </span> <pre>$rs = $DB->Execute("select * from table");<br>foreach ($rs as $row) {<br> print_r($row);<br>}<br></pre>
- <span class="style1">If you include the following adodb-exceptions.inc.php file, then ADOdb
- will throw exceptions when an error occurs:
- </span> <pre>include("<b>/path/to/adodb-exceptions.inc.php</b>");<br>include("/path/to/adodb.inc.php");<br>$DB = NewADOConnection('oci8'); <br>$DB->Connect("", "scott", "tiger");<br>try {<br> $DB->Execute("select badsql from badtable");<br>} catch (exception $e) {<br> print_r($e);<br>}<br></pre>
- <a name="download"></a>
- <h3 class="style1">Download</h3>
- <p class="style1">
- <a href="https://sourceforge.net/projects/adodb/files/adodb-php5-only/">Download from SourceForge</a><br>
- </p>
- <p class="style1"><i>Requirements</i>: PHP 5.0 or later.</p>
- <p class="style1"><i>Installation</i>: 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. </p>
- <p class="style1"><i>Debugging</i>: Set your connection's debug property, e.g.
- <tt>$DB->debug=true;</tt> if you are having problems. It will output lots of
- useful status and
- error messages.</p>
- <a name="docs"></a>
- <h3 class="style1">ADOdb Documentation</h3>
- <p class="style1"><a href="docs-adodb.htm">One HTML Page</a>
- </p>
- <p class="style1">
- <a href="docs-datadict.htm">Data Dictionary</a> for schema creation.<br>
- <a href="docs-perf.htm">Performance Monitoring</a>.<br>
- <a href="docs-session.htm">Database-backed Session Management</a>.
- </p>
- <h4 class="style1">Other Docs for PHP version</h4>
- <p class="style1">
- The 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.
- </p>
- <p class="style1">
- <a href="tute.htm">MySQL Tutorial</a><br>
- <a href="docs-oracle.htm">Advanced Oracle Tutorial</a><br>
- <a href="tips_portable_sql.htm">Portable SQL Tips with ADOdb</a><br>
- <a href="docs-active-record.htm">ADOdb Active Record</a>, an OOP encapsulation of a database record.</br>
- </p>
- <p class="style1">A couple excellent articles by icarus about ADOdb at MelonFire: </p>
- <p class="style1">
- <a href="http://www.melonfire.com/community/columns/trog/article.php?id=142">Part 1 on Basics</a> and
- <a href="http://www.melonfire.com/community/columns/trog/article.php?id=144">Part 2 on Advanced ADOdb</a>.
- </p>
- <h4 class="style1">Translations</h4>
- <p class="style1">PHP documentation in other languages: </p>
- <ul class="style1">
- <li><a href="http://phplens.com/lens/adodb/ADODB-Manual-Korean.htm">Korean</a></li>
- <li><a href="http://www.lacorona.com.mx/fortiz/adodb/">Spanish (Castellano)</a> </li>
- <li><a href="http://www.souken.co.jp/tech/php/adodb/docs-adodb-ja.htm">Japanese</a>
- </ul>
- <p class="style1">and tutorials in: </p>
- <ul class="style1">
- <li><a href="http://www.ifin.net.tw/adodb/adodb_tutorial.htm">Chinese</a><br></li>
- <li><a href="http://phplens.com/phpeverywhere/adodb_french">Francais</a><br></li>
- <li><a href="http://phplens.com/phpeverywhere/adodb_german">German</a><br></li>
- <li><a href="http://phplens.com/phpeverywhere/adodb_italian">Italian</a><br></li>
- <li><a href="http://phplens.com/adodb/adodb_tutorial_pl.html">Polish</a><br></li>
- <li><a href="http://www.lacorona.com.mx/fortiz/adodb/tute-es.htm">Spanish (Castellano)</a></li>
- <li><a href="http://www.exzilla.net/docs/adodb/adodb-mysql-tutorial.php">Thai</a><br></li>
- </ul>
- <a name="support"></a>
- <h3 class="style1">Support</h3>
- <p class="style1">Bug reports, feature requests and questions should be filed on
- <a href="https://github.com/ADOdb/ADOdb/issues">Github</a>.
- </p>
- <p class="style1">To discuss with the ADOdb development team and users,
- connect to our <a href="https://gitter.im/adodb/adodb">Gitter chatroom</a>
- using your Github credentials.<br>
- <a href="https://gitter.im/adodb/adodb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
- <img src="https://img.shields.io/gitter/room/form-data/form-data.svg" alt="Join chat on Gitter">
- </a>
- </p>
- <p class="style1">The legacy
- <a href="http://phplens.com/lens/lensforum/topics.php?id=4">ADOdb forums</a>
- are still available in read-only mode for reference.
- </p>
- <hr>
- <span class="style1">
- © 2000-2013 John Lim (jlim#natsoft.com)<br>
- © 2014 Damien Regad, Mark Newnham and the ADOdb community
- </span></td>
- </tr>
- </tbody>
- </table>
- </body>
- </html>
|