What database abstraction library, if any, do you use? I'm after a fairly simple one but with a handful of specific requirements:
1. It's got to work in PHP 4. PHP 5 as well would be nice but it's not vital.
2. It's got to work *everywhere*. That means it can't rely on PEAR being available (hence no PearDB or MDB).
3. It only needs to work with MySQL really.
4. It needs to handle a few things:
a. Escaping data.
b. Monitoring connections (a simple count of queries would be enough).
c. Returning data in the same form as PHP (eg, array, assoc or object).
I can't find anything good and I'm on the verge of writing my own, but I thought I'd ask first.
Database Abstraction
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
I use a very simple one like you do, and similar to the Connection classes that often pop-up around here. I tend to not do to much fancy database-wise out of habit. For example, I have more and more tended to push things like HTML into files rather than storing it in a database. If I am not querying the data -- just selecting by key -- then I think what the real use case is.
(#10850)
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
My ADOdb Lite does all of what you ask. Check the link in my signature. 
Plus, it even has a nifty debug console.
http://adodblite.sourceforge.net/debugconsole.php

Plus, it even has a nifty debug console.
http://adodblite.sourceforge.net/debugconsole.php

- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US