Home > active-record-php

active-record-php

Active-record-php is a project mainly written in PHP, it's free.

This is a POC clone of Rails' active_record in PHP 5.3

This is a simple ActiveRecord implementation for PHP 5.3.

Depends on:

  • PHP 5.3.2
  • PECL PDO
  • MySQL 5+

Modify test.php to suite your local PHP install. The sample DB dump is provided as test.sql.

Expected output of test.php:

Array ( [0] => Photo Object ( [row:protected] => Array ( [id] => 1 [user_id] => 1 )

    )

) User Object ( [row:protected] => Array ( [id] => 1 [user_name] => Love )

)

Changes: 2010-10-29: Updated to work with PHP 5.3.2

Previous:Rubuquet