PDO: Introduction PHP Data ObjectTag: PHP Data Objects, PDO, extension, PHP extension Category: PHP Databasepost: 18 Apr 2008 read: 804 PHP Data Objects (PDO) Step By Step Tutorial - Part 1: PDO is a PHP5 extension that defines a lightweight DBMs connection abstraction library. Mmm, we ever talk about DMB connection abstraction library (sometimes called data access abstraction library). Yup, we talk data access abstraction library using ADOdb. PHP ADOdb special for PHP4 and PDO only work for PHP5. PDO have function like ADOdb with more benefits. What is data access abstraction library? As we know, PHP support several major database, such as mySQL, SQLite, msSQL, and so on. Each connection to those database have unique code. For example, we want to connect to mysql, we wil write:
If we want to connect to SQLite:
for postgreSQL:
What that mean? For example, we have built application base on mysql. When our customer need move to SQLite, we must rebuild our application. We must rewrite many line code. How if our code consist 1,000,000 lines? Nightmare! Data access abstraction layer will bridge the different. We just write once, and run in every where (like java he he he....) Next, we talk how to activate PDO extension. |
| | Give Your Opinion | Recommend |
|

