PHP PDO Index


 

PHP PDO Index

In this tutorial we will study about PDO in PHP, it is a new feature of PHP which is included in PHP 5. This is the index page on this topic, subsequent pages will focus on every point on this topic.

In this tutorial we will study about PDO in PHP, it is a new feature of PHP which is included in PHP 5. This is the index page on this topic, subsequent pages will focus on every point on this topic.

PHP PDO:

PHP has introduced a new uniform interface for database connectivity called  PDO, it is used to connect with many type of database . PDO (PHP Database Objects) is a PHP extension which defines an object-oriented, lightweight, uniform  interface for database connectivity and accessing the data. PHP is not an abstraction layer like PearDB. It is much like Pearl's DBI. Using the following and subsequent tutorial's coding you can create your own database and use PDO.

To check available drivers in php.ini file execute the following piece of code and you will get to know about that, if you want to put more drivers on active mode then go to php.ini file and find out  your desired drives and remove the semicolons from that line:

 

Example:

<?php

foreach(PDO::getAvailableDrivers()as $driver)

{

echo $driver.'<br/>';

}

?>

Output:

mysql
odbc
pgsql
sqlite
sqlite2

 

This is the index page of PDO, following pages will illustrate how to connect with different DBMS and other features of PDO:

Ads