views:

116

answers:

5

I'd like to start building my own framework. Everything is fine, but I can't build the most important part (from my point of view): DB controller.

I've seen so many project codes and some uses ADOdb, others have built its own. I don't want compatibility, just an easy class that obviously filters SQL injections but also allows the user to use it easily.

Thank you in advance!

+2  A: 

How about Doctrine?

http://www.doctrine-project.org/

Darragh
Ill second Doctrine.
prodigitalson
+4  A: 

PDO is the best database wraper for PHP as it is included in PHP Core but if you need something different with more verbose methods you could try crystaldb

Ariel
+1 is for PDO. Not that it's necessarily the best, but it's very nice and easy to use
mabwi
+1  A: 

We really like using Propel. It is the other contender to Doctrine.

jpartogi
A: 

You might want to have a look at http://www.openmv.com/.

There are bunch of very 'lean' database drivers that can be re-used in your own framework.

Btw, your question is misleading, a "database abstraction layer" is something that provides an api so you can access postgresql, mysql, sql server, oracle ect.. the same way.

Either way, abstraction or not, openmv.com has both :)

Jon
A: 

give a try to DALMP : http://code.google.com/p/dalmp/ is support prepared statements and many cache backends (redis/memcache/apc), besides being very fast and small

tareco