ADODB is short for Active Data Objects Data Base. Like PDO, it is also a database abstraction layer. It was designed to solve the problem that PHP uses different application interfaces (APIS) to access different databases. Using ADODB makes it easy to port applications between different database systems.
ADODB supports multiple databases, such as MySQL, Oracle, postgre SQL, ms SQL Server, Interbase, Informix, Sybase, and DB2.
Can be downloaded from the official website http://adodb.sourceforge.net, is a compressed package, extract to the appropriate location, introduce the core file "ADODB. Inc. php" in the project can be used.
Sample Code: Include ('ADODB/ADODB. Inc. php ');
Step 3: connect to the database:
1. Determine the database type to connect to: MySQL database example: $ conn = adonewconnection ('mysql ');
2. Connect to the service and select database: $ Conn-> connect ($ db_host, $ db_user, $ db_psw, $ db_name );
3. Close the connection: $ Conn-> close ();
You can use the execute () method to access data, access data in ADODB, and execute SQL statements such as select, insert, update, and delete:
$ Result = $ Conn-> execute ($ query );