On the Zend Developer Zone, jonwage has posted about an ORM (Object-Relational mapping) he came across that can help abstract out your interface with your backend database - Doctrine.

One of its key features is the ability to optionally write database queries in an OO (object oriented) SQL-dialect called DQL inspired by Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains a maximum of flexibility without requiring needless code duplication.

The project's page gives the full details on the features it offers and has links to the latest downloads so you can try it out for yourself. There's even a blog you can subscribe to to keep up to date.