diff --git a/Delete.md b/Delete.md new file mode 100644 index 0000000..eeec5fd --- /dev/null +++ b/Delete.md @@ -0,0 +1,45 @@ +We offered you 2 ways to `Delete` into the XMLDB: + +*One is still experimental* + +## Delete item + +*Syntax:* + +`public function deleteItem($table, $id = null, $attributes = null)` + +*Example:* + +```php +$xmldb = new XMLDB('db.xml'); +$xmldb->deleteItem('table1','clock'); +``` + +*Return:* + +*True* if it works, *False* if not + +The example will delete the item which PK is 'clock' into the 'table1' + +## Delete node + +*Syntax:* + +`public function deleteNode($node)` + +*Params:* + +`$node` the selected node + +*Returns:* + +*True* if it works, *False* if not + +*Example:* + +```php +$xmldb = new XMLDB('db.xml'); +$xmldb->deleteNode($xmldbtest->selectFromPK('table1', 'clock', 'node')); +``` + +To find a _node_ you can use a [select](Select) \ No newline at end of file