From 28d9f0dbbaf1db2c127b2a29c39420e2fd0791c2 Mon Sep 17 00:00:00 2001 From: Shikiryu Date: Mon, 21 Oct 2019 09:38:21 +0200 Subject: [PATCH] --- Delete.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Delete.md 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