The PDO library is a powerful addition to PHP. It shines when you need to build applications capable of talking to different database systems. It also has other very useful capabilities. This article, the first in a three-part series, will introduce you to this versatile library.
Was trying to get MySQL and PDO to play well together lately and I have to say they do for the most part. Then I came to stored procedures. *sigh*
Okay, so in playing around with some of the somewhat bleeding edge stuff (well, okay, so PDO isn’t that bleeding edge) on my development server, I’m trying to get Oracle support working for a simple script. It doesn’t want to seem to cooperate, and I just wanted to make sure I’m not doing something I shouldn’t be (or are forgetting something) - because it still dosen’t work.
Problem and Solution - PDO from its author
What is PDO and why is it needed?
Topics:
• Problems with PHP DB access
• PDO Solution
• Features / Drivers
• Installation
• Getting Started
• Features
The new PHP Data Objects (PDO) have been covered in a past blog post but I thought that I'd cover it in a little more detail.
After reading the blog post and also Wez Furlong's blog I had a play around with some PDO code. Although there are already some PHP database abstraction classes available, the advantage of PDO is that it will be available in any PHP installation (so long as it is enabled) at runtime, without any need for recompiling. In addition, since it has been written from scratch specifically for PHP 5, it has a high level of performance. And if you are like me and often only want the key features, then PDO provides all the essential functions you need to connect to different databases. If you need the "full works", then the PEAR MDB2 package can handle that.
PHP 5.1 is set to ship with a brand-new database connectivity layer known as PHP Data Objects (PDO). While PHP has always had very good database connectivity, PDO takes PHP to the next level. Learn how to obtain, install and use PDO to connect to IBM® DB2® Universal Database™ and IBM Cloudscape™ databases, insert and retrieve data, and explore more advanced features, such as prepared statements, bound parameters, scrollable cursors, positioned updates and LOBs. Also, get a brief introduction on handling multibyte data.
• PDO extension
• PEAR::MDB2
• Client API
• SQL syntax
• SQL concepts
• Result sets
• Error codes
• High level features
# Problems with PHP DB access
# PDO Solution
# Features / Drivers
# Installation
# Getting Started
# Features








