##1: What is PDO
PDO 1 is the abbreviation of PHP Data Object (PHP Data Object) and is released together with PHP5.1 version. Currently supported databases Including Firebird, FreeTDS, Interbase, MySQL, MS SQL Server, ODBC, Oracle, Postgre SQL, SQLite and Sybase, etc.2: Characteristics of PDO
1. Coding consistencySince the various database extensions available for PHP are written by different publishers , so although all extensions provide basically the same features, they do not satisfy coding consistency. PDO eliminates this inconsistency and provides a single interface that can be used for various databases;2. FlexibilityBecause PDO loads the necessary database drivers at runtime, there is no need to Reconfigure and recompile PHP every time you use a different database. For example, if the database needs to be switched from SQL to MySQL, you only need to load the PDO_MYSQL driver. 3. Object-oriented featuresPDO uses the object-oriented features of PHP5 to achieve more powerful and efficient database communication. 4. High performance PDO is written in C and compiled to PHP, providing higher performance compared to other solutions written in PHP, although everything else is the same .3: PDO installation
You can check whether the PDO extension is installed through PHP's phpinfo() function. 1.Install PDO on Unix systemOn Unix or Linux you need to add the following extension:extension=pdo.so
extension=php_pdo.dll
;extension=php_pdo_firebird.dll ;extension=php_pdo_informix.dll ;extension=php_pdo_mssql.dll ;extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll ;extension=php_pdo_oci8.dll ;extension=php_pdo_odbc.dll ;extension=php_pdo_pgsql.dll ;extension=php_pdo_sqlite.dll
The above is the detailed content of What is PDO. For more information, please follow other related articles on the PHP Chinese website!