AdoDBRecord -- an ActiveRecord look-alike in PHP using AdoDB
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


AdoDBRecord -- an ActiveRecord look-alike in PHP using AdoDB

Author: Kai Krakow <>

Disclaimer: By using this software you agree to the terms of GPLv2:


You need the following software to run AdoDBRecord: (essential) (unit testing)

Read first

Since I developed with Rails using the ultra-comfortable ActiveRecord I
felt the need for a similar solution in PHP. Googling around I found some
people saying this is impossible. That’s true: Ruby’s OOP implementation
is in many ways superior to PHP’s.

But anyway I decided: Some of ActiveRecord's comfort must be possible in
PHP. I’ve decided to build on AdoDB for PHP since it already does the
heavy lifting of database abstraction very good.

The interface is currently very limited and should be very self
explanatory. For all interested hackers I’ve set up a git repository
at GitHub and would be very interested on your feedback.

This project grew out of the need to ease up database development in an
already existing legacy application. It’s not meant as an exact
ActiveRecord replacement in PHP – just similar in convenience.


Copy to your php includes location. Best choice may be where your resides, however you can configure that with the
$PREFIX_ADODB variable. At least v4.54 of AdoDB is needed which
will be checked. Adjust the database settings in the class file
or create an own file which contains these settings and include the
class file from there instead. I know, this is currently not so well

Directory Layout

lib      ... Main class, class tree
examples ... Sample code, usage
tests    ... Unit tests