index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. pre {
  6. background-color: #eee;
  7. padding: 0.75em 1.5em;
  8. font-size: 12px;
  9. font-family: "Lucida Console", "DejaVu Sans Mono", Courier, monospace;
  10. border: 1px solid #ddd;
  11. }
  12. body {
  13. background-color: #0066FF;
  14. }
  15. .style1 {
  16. font-family: Arial, Helvetica, sans-serif
  17. }
  18. .style2 {
  19. font-family: Arial, Helvetica, sans-serif;
  20. color: #FFFFFF;
  21. }
  22. </style>
  23. <title>ADOdb Database Abstraction Library for PHP</title>
  24. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  25. </head>
  26. <body>
  27. <table width="986" cellpadding=8 border="2" align="center" bordercolor="#999999">
  28. <tbody>
  29. <tr>
  30. <td bgcolor="#FFFFFF">
  31. <table border="0" cellpadding=2 width="100%">
  32. <tbody>
  33. <tr bgcolor="#000099">
  34. <td bordercolor="#FFFFFF" class="style2">
  35. <h2>ADOdb Database Abstraction Library for PHP</h2>
  36. <p>v5.20.3 - 01-Jan-2016</p>
  37. <td align="center" valign="center" bgcolor="#CCCCCC" class="style1"><img src="adodb.gif"></td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. <p class="style1"> <font size="3">
  42. <a href="#download">Download</a> &nbsp;
  43. <a href="https://github.com/ADOdb/ADOdb">Source code</a> &nbsp;
  44. <a href="#docs">Documentation</a> &nbsp;
  45. <a href="#support">Support</a> &nbsp;
  46. <a href="https://github.com/ADOdb/ADOdb/blob/master/docs/changelog.md">Changelog</a>&nbsp;
  47. <a href="adodb-faq.html">FAQ</a> </font></p>
  48. <hr>
  49. <p class="style1">ADOdb is a database abstraction library for PHP</p>
  50. <p class="style1">It currently supports an amazing number of
  51. databases, thanks to the wonderful ADOdb community: <i>MySQL,
  52. PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, Foxpro,
  53. Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP, </i>and<i>
  54. generic ODBC, ODBTP</i>. The Sybase, Informix, FrontBase and
  55. PostgreSQL, Netezza, LDAP, ODBTP drivers are community contributions.
  56. Here is the <a href="docs-adodb.htm#drivers">complete
  57. list of drivers</a>. </p>
  58. <p class="style1"> Many popular web applications such as
  59. <a href="http://www.andrew.cmu.edu/%7Erdanyliw/snort/snortacid.html">ACID</a>,
  60. <a href="http://community.zikula.org">Zikula/PostNuke</a>,
  61. <a href="http://phpwiki.sourceforge.net/">phpWiki</a>,
  62. <a href="http://www.mamboserver.com/">Mambo</a>,
  63. <a href="http://phpgacl.sourceforge.net/">PHP GACL</a>,
  64. <a href="http://sourceforge.net/projects/tikiwiki">TikiWiki</a>,
  65. <a href="http://www.egroupware.org/">eGroupWare</a> and
  66. <a href="http://phplens.com/lens/">phpLens App Server</a>
  67. are using ADOdb as their database abstraction layer.
  68. Some reasons why ADOdb is popular include: </p>
  69. <ul class="style1">
  70. <li>Designed for <b>speed</b>. It is probably the fastest open
  71. source database abstraction library available for PHP. See <a
  72. href="http://phplens.com/lens/adodb/">benchmarks</a>.</li>
  73. <li>Provides <b>extensive portability support</b> such as date
  74. and type-handling and portable schema creation. See <a
  75. href="tips_portable_sql.htm">portable sql tips</a></li>
  76. <li>Support many <b>enterprise features</b> such as database
  77. backed sessions (with session expiry notification), SQL code
  78. generation, pivot tables, SELECT LIMIT emulation for all databases,
  79. performance monitoring.</li>
  80. <li><b>Easy to learn</b>, especially if you have Window's
  81. programming experience, as it uses many ADO conventions.</li>
  82. <li><b>Extensive QA</b>, every release is unit-tested on
  83. Access, MySQL, PostgreSQL, MS SQL, Oracle 11g.</li>
  84. <li><b>Mature</b>, continiously developed since August 2000.
  85. Has a <b>large community</b> of users. </li>
  86. <li>Powerful <strong>Active Record </strong>support. See <a href="docs-active-record.htm">docs</a>. </li>
  87. <li>Very <b>reasonable licensing</b> terms (BSD). This means
  88. that you can incorporate (and even compile) it into your software
  89. applications<b> royalty-free</b> without asking the author's
  90. permission, provided you include the
  91. <a href="https://github.com/ADOdb/ADOdb/blob/master/LICENSE.md">ADOdb Licence</a>
  92. in your release.
  93. Also dual-licensed (Lesser GPL v2.1). </li>
  94. </ul>
  95. <h3 class="style1">PHP Code Samples</h3>
  96. <pre>include('/path/to/adodb.inc.php');<br>$DB = NewADOConnection('mysql');<br>$DB-&gt;Connect($server, $user, $pwd, $db);<br><br><font
  97. color="#006600"># M'soft style data retrieval with binds</font>
  98. $rs = $DB-&gt;Execute("select * from table where key=?",array($key));
  99. while (!$rs-&gt;EOF) {
  100. print_r($rs-&gt;fields);
  101. $rs-&gt;MoveNext();
  102. }
  103. <font color="#006600"># PEAR style data retrieval</font>
  104. $rs = $DB-&gt;Execute("select * from table where key=123");
  105. while ($array = $rs-&gt;FetchRow()) {
  106. print_r($array);
  107. }
  108. <font color="#006600"># Alternative URI connection syntax:</font>
  109. $DB = NewADOConnection("<b>mysql://$user:$pwd@$server/$db?persist</b>");<br><br><font
  110. color="#006600"># No need for Connect or PConnect when using URI syntax</font>
  111. $ok = $DB-&gt;Execute("update atable set aval = 0");
  112. if (!$ok) mylogerr($DB-&gt;ErrorMsg());
  113. </pre>
  114. <p class="style1">Other things you can try include: </p>
  115. <pre><font color="#006600"># Updating tables</font>
  116. $ok = $DB-&gt;Execute("update table set col1=? where key=?",array($colval, $key));
  117. <font color="#006600"># retrieving data shortcuts</font>
  118. $val = $DB-&gt;GetOne("select col from table where key='John'");
  119. $row = $DB-&gt;GetRow("select col from table where key='John'");
  120. $arr = $DB-&gt;GetAll("select col from table");
  121. $arr = $DB-&gt;GetAssoc("select key,col from table"); # returns associative array $key=&gt;col
  122. <font color="#006600"># Retrieve high speed cached recordsets (cached for 3600 secs)<br>
  123. # Cache directory defined in global $ADODB_CACHE_DIR. <br>
  124. # CacheGetOne, CacheRow, CacheGetAll all work</font>
  125. $rs = $DB-&gt;CacheExecute(3600, "select orgname from users where user='JOHN'");
  126. </pre>
  127. <span class="style1">And there are <a href="docs-adodb.htm#coding">more
  128. connection examples</a> showing you how to connect to
  129. <a href="docs-adodb.htm#sqlite">SQLite</a>,
  130. <a href="docs-adodb.htm#oci8">Oracle</a>,
  131. <a href="docs-adodb.htm#postgres">PostgreSQL</a>,
  132. <a href="docs-adodb.htm#odbc_mssql">Microsoft SQL Server</a>,
  133. <a href="docs-adodb.htm#access">MS Access</a>,
  134. <a href="docs-adodb.htm#ldap">LDAP</a>,
  135. <a href="docs-adodb.htm#ibase">Interbase/Firebird</a>,
  136. etc.
  137. </span>
  138. <h3 class="style1">PHP5 Support</h3>
  139. <span class="style1">ADOdb has full PHP5 support, including SPL and exception support. For
  140. example, you can do this in PHP5:
  141. </span> <pre>$rs = $DB-&gt;Execute("select * from table");<br>foreach ($rs as $row) {<br> print_r($row);<br>}<br></pre>
  142. <span class="style1">If you include the following adodb-exceptions.inc.php file, then ADOdb
  143. will throw exceptions when an error occurs:
  144. </span> <pre>include("<b>/path/to/adodb-exceptions.inc.php</b>");<br>include("/path/to/adodb.inc.php");<br>$DB = NewADOConnection('oci8'); <br>$DB-&gt;Connect("", "scott", "tiger");<br>try {<br> $DB-&gt;Execute("select badsql from badtable");<br>} catch (exception $e) {<br> print_r($e);<br>}<br></pre>
  145. <a name="download"></a>
  146. <h3 class="style1">Download</h3>
  147. <p class="style1">
  148. <a href="https://sourceforge.net/projects/adodb/files/adodb-php5-only/">Download from SourceForge</a><br>
  149. </p>
  150. <p class="style1"><i>Requirements</i>: PHP 5.0 or later.</p>
  151. <p class="style1"><i>Installation</i>: Unpack files into a directory. Try the
  152. above sample code, adjusting
  153. the connection parameters to suit your database server, and modify the
  154. sql to match your tables. </p>
  155. <p class="style1"><i>Debugging</i>: Set your connection's debug property, e.g.
  156. <tt>$DB-&gt;debug=true;</tt> if you are having problems. It will output lots of
  157. useful status and
  158. error messages.</p>
  159. <a name="docs"></a>
  160. <h3 class="style1">ADOdb Documentation</h3>
  161. <p class="style1"><a href="docs-adodb.htm">One HTML Page</a>
  162. </p>
  163. <p class="style1">
  164. <a href="docs-datadict.htm">Data Dictionary</a> for schema creation.<br>
  165. <a href="docs-perf.htm">Performance Monitoring</a>.<br>
  166. <a href="docs-session.htm">Database-backed Session Management</a>.
  167. </p>
  168. <h4 class="style1">Other Docs for PHP version</h4>
  169. <p class="style1">
  170. The documents in this section are maintained (or not, as the case may be)
  171. by their respective authors and are therefore potentially out of date
  172. or even obsolete.
  173. </p>
  174. <p class="style1">
  175. <a href="tute.htm">MySQL Tutorial</a><br>
  176. <a href="docs-oracle.htm">Advanced Oracle Tutorial</a><br>
  177. <a href="tips_portable_sql.htm">Portable SQL Tips with ADOdb</a><br>
  178. <a href="docs-active-record.htm">ADOdb Active Record</a>, an OOP encapsulation of a database record.</br>
  179. </p>
  180. <p class="style1">A couple excellent articles by icarus about ADOdb at MelonFire: </p>
  181. <p class="style1"> &nbsp; &nbsp;
  182. <a href="http://www.melonfire.com/community/columns/trog/article.php?id=142">Part 1 on Basics</a> and
  183. <a href="http://www.melonfire.com/community/columns/trog/article.php?id=144">Part 2 on Advanced ADOdb</a>.
  184. </p>
  185. <h4 class="style1">Translations</h4>
  186. <p class="style1">PHP documentation in other languages: </p>
  187. <ul class="style1">
  188. <li><a href="http://phplens.com/lens/adodb/ADODB-Manual-Korean.htm">Korean</a></li>
  189. <li><a href="http://www.lacorona.com.mx/fortiz/adodb/">Spanish (Castellano)</a> </li>
  190. <li><a href="http://www.souken.co.jp/tech/php/adodb/docs-adodb-ja.htm">Japanese</a>
  191. </ul>
  192. <p class="style1">and tutorials in: </p>
  193. <ul class="style1">
  194. <li><a href="http://www.ifin.net.tw/adodb/adodb_tutorial.htm">Chinese</a><br></li>
  195. <li><a href="http://phplens.com/phpeverywhere/adodb_french">Francais</a><br></li>
  196. <li><a href="http://phplens.com/phpeverywhere/adodb_german">German</a><br></li>
  197. <li><a href="http://phplens.com/phpeverywhere/adodb_italian">Italian</a><br></li>
  198. <li><a href="http://phplens.com/adodb/adodb_tutorial_pl.html">Polish</a><br></li>
  199. <li><a href="http://www.lacorona.com.mx/fortiz/adodb/tute-es.htm">Spanish (Castellano)</a></li>
  200. <li><a href="http://www.exzilla.net/docs/adodb/adodb-mysql-tutorial.php">Thai</a><br></li>
  201. </ul>
  202. <a name="support"></a>
  203. <h3 class="style1">Support</h3>
  204. <p class="style1">Bug reports, feature requests and questions should be filed on
  205. <a href="https://github.com/ADOdb/ADOdb/issues">Github</a>.
  206. </p>
  207. <p class="style1">To discuss with the ADOdb development team and users,
  208. connect to our <a href="https://gitter.im/adodb/adodb">Gitter chatroom</a>
  209. using your Github credentials.<br>
  210. <a href="https://gitter.im/adodb/adodb?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge">
  211. <img src="https://img.shields.io/gitter/room/form-data/form-data.svg" alt="Join chat on Gitter">
  212. </a>
  213. </p>
  214. <p class="style1">The legacy
  215. <a href="http://phplens.com/lens/lensforum/topics.php?id=4">ADOdb forums</a>
  216. are still available in read-only mode for reference.
  217. </p>
  218. <hr>
  219. <span class="style1">
  220. &copy; 2000-2013 John Lim (jlim#natsoft.com)<br>
  221. &copy; 2014 Damien Regad, Mark Newnham and the ADOdb community
  222. </span></td>
  223. </tr>
  224. </tbody>
  225. </table>
  226. </body>
  227. </html>