As developers, we tend to keep writing a particular piece of code time and again… Not because, we want to, but because we have to… Called boilerplate code, this chunk is unavoidable, repetitive and kinda grows on you over time!
I was recently coding up a web app using PHP and MySql and, I set out to find a wrapper class that provides good and fast CRUD functionality for MySql.
What I found, I ought to share! This post is tribute to an amazing PHP, MySql wrapper class that I have come to use and love over sometime now. The code is by a developer on a website called ricocheting. The php mysql wrapper code can be downloaded from here.
I really appreciate that the code is fully documented in terms of functionality provided and also has strict type checking (strip slashes, escaping data, et. al.) and error reporting on sql queries. A nice addon to the script is that it allows to force open multiple database connections to the same database from the same source.
I am not going to take time into rewriting all that wonderful help documentation the developer has produced on his website. So, go ahead and check it out there.
The code has been released under the GPL license so, all you code-monks are free to tweak and boost it! Do let me know if someone comes up with a similar / updated / more functional code-chunk for this purpose.
Chao…

Recent Comments