parent
634d42c7f1
commit
28d9f0dbba
45
Delete.md
Normal file
45
Delete.md
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user