Database Abstraction With PHP (
Page 1 of 11 )
One of the nicest things about Perl - the DBI module - finally
makes an appearance in PHP. Take a look at the PEAR database abstraction
layer, by far one of the coolest PHP widgets out there.I'm almost ashamed to admit it, but a long time ago, I used to be a Perl
programmer.
Not a good one, mind you. A very bad one. One who would
continually get confused by the difference between hashes and arrays, and hated
every second of writing a regex. One who felt like curling up and crying for
Mommy every time he had to use strict().
Then I discovered PHP, and my
life suddenly took a turn for the better. Gone were those agonizingly-strange
symbols and convoluted syntactical constructs. PHP was clean, user-friendly and
came with a manual that actually seemed to be written by humans. I felt
reborn.
There was one thing I missed about Perl, though - the DBI. The
DBI provided a database-independent way to write database-driven Perl code, a
necessity when developing dynamic Web sites. PHP, on the other hand, had
specific functions to be invoked for each database type - which made code
written for one database system hard to port over to other database
systems.
Then I found PHP's database abstraction layer, and I felt like
I'd come home.