Database Access with PHP Data Objects

By:
Mr Richard Buggy
To add a paper, Login.

While PHP has long supported most databases each one has been implemented as a separate extension with its own API. As a result supporting multiple databases has traditionally been difficult and the majority of PHP applications only support a single database.

First introduced in PHP 5 the PHP Data Objects (PDO) extension provides PHP with a data access abstraction layer, similar to Perls DBI or Pythons DB-API. This does not solve the problem of databases having different syntax but it does mean that programmers now only need to learn and use a single database API regardless of the database being used. PDO also supports prepared statements across all databases which reduces the risk of SQL injection attacks.

This presentation provides as an introduction to PDO for programmers who are still using database specific extensions. It will cover:
- What the PDO extension does and does not provide
- Using the PDO extension
- Writing database independent code with PDO


Keywords: PHP, PHP Data Objects, PDO, Data Access Abstraction Layer
Stream: PHP
Presentation Type: 30 minute Presentation in English
Paper: A paper has not yet been submitted.


Mr Richard Buggy

Founder, Zoombug
Sydney, NSW, AUSTRALIA

Richard has been developing websites since 1995 and using PHP since 1999. He has worked for a number of universities and in 2003 founded Zoombug, a company which specializes in building web applications using PHP. He is also a regular presenter at the Sydney PHP Users Group, a member of the Sydney Linux Users Group and an organizer of BarCamp Sydney.

Ref: OS7P0034