A preliminary study of PHP Adodb

Source: Internet
Author: User
Tags manual error handling
PHP ADODB version 1.99 manual Chinese Translation
Translation Author: TRIPC
Fixed Author: heiyeluren
----------------------------------------------

Amendment Note: Because the previous version is Taiwan version, so many statements do not conform to the use of the mainland habits, so I slightly modified with editplus, hope to learn ADODB comrades a reference.
(Heiyeluren amended in 2005-6-22)

ADODB
PHP in the database support is very commendable, almost all well-known database systems have the corresponding function group support, and the support is very complete. Unfortunately, each group of database support functions, whether in terms of name or parameter structure, are very different, which makes the PHP system developers in the face of changing the database, always feel pain. Is there no solution to this problem? Oh, of course there is, the answer is I now want to introduce the ADODB this PHP object.

ADODB provides complete methods and attributes to allow engineers to control the database system, even better you just remember its function is good, because different database system, as long as the modification of a property value can be, ADODB will automatically according to the set to take the correct PHP function. In addition, at most, with the database system modifications to modify the SQL instructions, your PHP system can be replaced in the shortest possible time to another database system, if you write the program, the SQL instructions can be properly planned, it will be faster.

After the introduction, I believe you have a ADODB of the function of understanding, the following is a detailed description of ADODB.

Get ADODB
You can get the latest version of ADOdb in Http://php.weblogs.com/ADOdb. I am writing this article, the latest version is 1.99 version, copyright mining Bsd-style and LGPL dual-track, in other words is freeware, there is no limit. However, after the acquisition of ADODB, it is best to look at the relevant copyright instructions and usage, and this article to control, so as to avoid errors.

Using ADODB
Basically using ADODB is fairly easy, and after getting the zipped file, I recommend that the entire content be solved in the ADODB directory. Then you can refer to this article, while studying the example inside, put it in the test directory.

As the ADODB attached is very complete and detailed, most of the following instructions from the ADODB Readme.htm, not all of the content, I put some I do not use the content has been removed, such as version difference description, how to write support for the ADODB driver, and so the application-independent parts. Readers who want to know all the content can still refer to Readme.htm.


--------------------------------------------------------------------------------

Brief introduction

Characteristics

Installation

Start ADODB

Adonewconnection

Newadoconnection

Supported databases

Learning Manuals

Example 1:select

Example 2: Advanced Select

Example 3:insert

Example 4: Debugging and rs2html examples

Example 5:mysql and Menu

Example 6: Connect two databases at a time

Example 7: Generate updates and new SQL directives

Example 8: Scroll with the next stroke and previous implementation

Customer-made error handling and pear error

Data Set Cache

Reference manual

ADOConnection

Connection database: Connect pconnect

Execute Sql:execute cacheexecute selectlimit cacheselectlimit Prepare preparesp getone GetRow

Generate Updates/add: Getupdatesql getinsertsql

Blob:updateblob Updateclob Updateblobfile

Change page/volume page: Pageexecute cachepageexecute

Clear: Cacheflush Close

Trading: BeginTrans CommitTrans RollbackTrans

Extract data: $ADODB _fetch_mode Blankrecordset

String: Concat qstr

Date: DBDate dbtimestamp unixdate Unixtimestamp

Column Manager: Affected_rows insert_id GenID

Error handling: ErrorMsg Errorno

Data dictionary: metadatabases Meta

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.