Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

stevexucd/arraydb

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.