DB abstraction library like codeigniter
Does any one know of a light weight DB abstraction library like the one codeigniter has. I had a look at Pear:MDB but its not what I am looking for.
I am looking for chaining features. For eg:
$this->db->get_where('table_name', 'condition')->row()->'column_name' ;
This makes syntax very compact.
TIA,
NB : I am not at all looking for an ORM as might be inferred from t开发者_开发技巧he discussion or otherwise.
If you need external libraries, then these are very good:
1) http://adodb.sourceforge.net/
2) http://www.doctrine-project.org/projects/dbal
3) http://www.phpclasses.org/package/4222-PHP-SQL-database-abstraction-layer.html
4) http://www.phpclasses.org/package/3915-PHP-Database-abstraction-layer-similar-to-PDO.html
doctrine and propel(http://www.propelorm.org/) are my favorites both competing to be leading orms.
personally I'd prefer propel if you do not need doctrine:migrations(particularly if you don't need to version your database)
still keep in mind u'll need versioning one day, so it might be convenient to start with doctrine.
One more to the list:
https://open-mv.googlecode.com/svn/trunk/classes/database/
精彩评论