I've been using Creole for any year, but Creole project is dead now..

what exactly are other good abstractions for php ?

I believe the built-in PDO library may be what you are searching for.

Why not give ADODB a go? It's virtually an energetic project and supports an incredible quantity of databases:

  • MySQL
  • PostgreSQL
  • Interbase
  • Firebird
  • Informix
  • Oracle
  • MS SQL
  • Foxpro
  • Access
  • ADO
  • Sybase
  • FrontBase
  • DB2
  • SAP DB
  • SQLite
  • Netezza
  • LDAP
  • and generic ODBC, ODBTP etc.

It's quite simple syntax and also the learning curve is very low. Here is a small example using their site:

$DB = NewADOConnection('mysql');
$DB->Connect($server, $user, $pwd, $db);

# M'soft style data retrieval with binds
$rs = $DB->Execute("select * from table where key=?",array($key));
while (!$rs->EOF) {

# PEAR style data retrieval
$rs = $DB->Execute("select * from table where key=123");
while ($array = $rs->FetchRow()) {

# Alternative URI connection syntax:
$DB = NewADOConnection("mysql://$user:$pwd@$server/$db?persist");

# No need for Connect or PConnect when using URI syntax

$ok = $DB->Execute("update atable set aval = 0");
if (!$ok) mylogerr($DB->ErrorMsg());

Cheers, miCRoSCoPiC^eaRthLinG

The PDO Abstraction Layer is put together automatically directly into versions of PHP >= 5.1

Beware, however, that PDO isn't for systems where performance may be the top goal. PDO is perfect for situations where compatibility is the better concern.

"PDO isn't to be used on systems where mysql performance is really a top goal" => http://dealnews.com/designers/php-mysql.html

If you're simply using mysql, then you definitely ought to make use of the php_mysqli extension.

you could attempt dibi - dibiphp.com

provide a attempt to DALMP: http://code.google.com/p/dalmp/ is support prepared claims and several cache backends, besides being extremely fast

I discovered a little DB abstraction layer, however it only agreed to be one guy doing the work. It's right lower my alley. I have tried on the extender a couple of occasions.


You can always write your personal. A singleton database handler should simply be about 500 lines, including comments.

I'd choose Doctrine anytime.

Zend_Db from ZF can also be excellent.

I made use of EZ SQL previously, which really accelerates writing PHP/MySQL applications.

It's the SQL library utilized in Wordpress.


For PHP 5, take a look http://www.openmv.com/ (MV_Database_Connection), it's new but includes a very mobile and consistent well-examined api.

Much like ADODB but considerably cleaner code.