scriptNode

Web development with a focus on JavaScript RSS

MySQL Database Class

Intermediate Matt Hackett Published August 24th, 2008 by Matt Hackett

I've been spending loads of time recently with a new project that's supposed to be comprised mostly of what I love doing the most: hardcore JavaScript. Unfortunately, most front-ends aren't much without a back-end to fall on, so I've had to hit the PHP pretty hard too.

When modifying the framework I had built, I noticed that the old database class I was using was a little out of date. PHP5 is the new standard, shouldn't we all be using PDO? So I added migrating to PDO to my to-do list. But really, the class is a pretty good one. It's certainly been useful to me for, well, almost a few years now, give or take a few dozen tweaks.

So given the longevity of the script, I thought I'd offer it up for this week's Script Sunday:

And here's a quick example of how to use it:

Read other articles tagged: , ,

Comments (2)

Thoughts?

(required)

© 2008 scriptNode