·  PHP – API – PDO – Introduction

 

- Info:

  - PDO stands for PHP Data Objects.

  - PDO is DBAL - Database Abstraction Layer.

  - You can determine which PDO drivers are available by running followinh PHP script:

    <?php print_r(pdo_drivers()); ?>

 

- DBAL:

  - Goal of any DBAL API is to allow you to use the same classes/functions to work with different Data Bases.

    This means that the same code would work for MySQL, Oracle, SQLite and other Data Bases.

  - This is in contrast of using for instance MySQL API which works only with MySQL DB.

    Code written with MySQL API must be rewriten to work with Oracle or some other DB.

 

- Other DBALs:

  - MDB2 is written in PHP and available as a PEAR package supporting:

    FrontBase, InterBase, Informix, Mini SQL, MySQL, Oracle, ODBC, PostgreSQL, SQLite, and Sybase.

  - JDBC is Java Database Connectivity (JDBC) standard allowing Java programs to interact with any database for which a     JDBC driver is available like: Microsoft SQL Server, MySQL, Oracle, and PostgreSQL.

  - ODBC is Open Database Connectivity interface. It is one of the most widespread abstraction implementations in use       today, supported by a wide range of applications and languages, PHP included.

    ODBC drivers are offered by all mainstream databases, including those referenced in the above JDBC introduction.

  - Perl DBI is Perl Database Interface module. It is Perl’s standardized means for communicating with a database, and was

    the inspiration behind PHP’s DB package.

  - PEAR::DB is PHP DBAL.

 

- Additional Tutorials:

  - PHP – API – PDO – Advantages

  - PHP – API – PDO – Install

  - PHP – API – PDO – MySQL – Introduction

  - PHP – API – PDO – MySQL – Install

  - PHP – API – PDO – MySQL – Connect

  - PHP – API – PDO – MySQL – Insert

  - PHP – API – PDO – MySQL – Select

  - PHP – API – PDO – MySQL – Select – Retreive rows in different formats

  - PHP – API – PDO – MySQL – Select – Prepared Statement – Named Parameters

  - PHP – API – PDO – MySQL – Select – Prepared Statement – Positional Parameters

  - PHP – API – PDO – MySQL – Update

  - PHP – API – PDO – MySQL – Delete

  - PHP – API – PDO – MySQL – Transactions

  - PHP – API – PDO – MySQL – Errors/Exceptions

  - PHP – API – PDO – MySQL – Errors/Exceptions – Exceptions

  - PHP – API – PDO – MySQL – Errors/Exceptions – Errors