What is Php PDO ?


PHP Data Object is a Database Connection Abstraction Library for PHP 5.
PDO is extension written in a compiled language (C/C++).
It is a Lightweight Database abstract library.

Why to use PDO?

  • PDO Supports number of database systems supported by PHP
  • You need not to code for many database in php. Just write one and run anywhere
  • PDO is written in compiled language so its speed is more than PHP libraries (ADOdb, PEAR DB) which are written in an interpreted language.
  • It is very easy to install.

When to use PDO?

when we  develope Application from scratch, and also for getting speed we should use PDO.

How to Activate Php PDO ?

If php PDO extension is not enable in your php configuration then 
Go to php.ini and  remove comment from directives as below.

extension = php_pdo.dll
extension = php_pdo_mysql.dll 

Now Restart the Apache. And Done.

No comments: