Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

define your data model using array configs, reach your data as arrays.

branch: master
Octocat-spinner-32 doc Update doc/readme.md October 02, 2012
Octocat-spinner-32 lib comment change January 11, 2013
Octocat-spinner-32 sample comment change January 11, 2013
Octocat-spinner-32 .gitignore start main library April 24, 2012
Octocat-spinner-32 README.md name change an link addition May 24, 2012
README.md

arrayDB, new easy PHP ORM

Define your data model as an array, reach your data as an array.

For a complete example, please have a look at this folder.

For a more detailed documentation, please have a look at this folder.

For a sneak peek, follow the document.

Simple usage

Getting some relational data

foreach($adb->id_list('user') as $uid) {
    $user=$adb->load('user', $uid);
    echo 'User Name: ' . $user['name'] . "<br />\n";

    foreach ($user['friend'] as $fid) {
        $friend=$adb->load('user', $fid);
        echo 'Friend Name: ' . $friend['name'] . "<br />\n";
    }

    echo "<br />\n";
}

Adding / updating some data

$uid1=$adb->create('user', array('name'=>'Mustafa'));

$user1=$adb->load('user', $uid1);

$user1['name']='Mercan';
// no save needed, data saved automatically

Setting relations

$uid2=$adb->create('user', array('name'=>'Mustafa'));

$adb->relate('user', 'friend', $uid1, $uid2);

Removing items

$adb->delete('user', $uid1);
Something went wrong with that request. Please try again.