IBM’s developerWorks have now posted parts one and two- of their two-part tutorial on writing a U2-PDO driver and then using it. If you’ve ever been curious about how to write extensions for PHP, this is a great tutorial. (Yes, you do need to know C.) If you have never written an extension for PHP or are new to the concept, you may want to start with Sara Golemon’s tutorials (I, II and III ) on the subject first and then move into this one.
The PHP Data Objects (PDO) extension provides a lightweight, convenient means for accessing databases in PHP. However, you must use a database-specific PDO driver to access a database server. Currently there is no PDO driver for the IBM’s U2 data servers, Uni Data and UniVerse.
Part One teaches you how to write a PDO driver for U2 using the U2 native interface, InterCall. In Part Two- you learn how to put the driver you’ve created to use in a PHP application.
Now I’ll be the first to admit that writing a PDO driver in C for a database is not something most developers normally do. However, the article is still interesting and gives a glimps into an area of PHP that most of us take for granted. (The code beneath our code)
=C=

Comments