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:
mysql_connect($host, $user, $password);
If we want to connect to SQLite:
sqlite_open($db, 066);
for postgreSQL:
pg_connect("host=$host dbname=$db user=$user password=$password");
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.
Previous:PHP Data Object/PDO Tutorial
Next: PDO: Activation PHP Data Objects Extension