PHP Classes

File: examples/rename.php

Recommend this page to a friend!
  Classes of Rafa Rodriguez   Div PHP Nodes   examples/rename.php   Download  
File: examples/rename.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Div PHP Nodes
Manage database of objects stored in record files
Author: By
Last change:
Date: 5 years ago
Size: 506 bytes


Class file image Download

 * Div PHP Nodes
 * Example
 * @author Rafa Rodriguez [@rafageist] <>

include "../divNodes.php";

// Adding a schema on the fly if not exists
$db = new divNodes("database/contacts");

// Deleting all nodes in schema database/contacts

// Add node into schema database/contacts
"name" => "Peter Nash",
"age" => 25,
"city" => 'NY'
], "peter");

$db->addIndex(["ny"], "peter", null, null, true);

$db->renameNode("peter", "nash");