Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ActiveRecord pattern in PHP. Requires MDB2
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ActiveRecord.class.php Fixing created_on bug and removing some hooks
README Basic structure

README

ActiveRecord for PHP

Loosely based on the ruby ActiveRecord class.  Makes heavy use of MDB2


Usage:

1) First, include ActiveRecord:

require_once('phpactiverecord/ActiveRecord.class.php');

2) Connect to your database. You can use any MDB2 supported database

ActiveRecord::connect('mysql://username:password@host:port/database');

3) Create your class

class User extends ActiveRecord {

	public function __construct($id=null){
		parent::__construct($id);
	}

}
Something went wrong with that request. Please try again.