1 Delete
Shikiryu edited this page 2019-10-21 09:38:21 +02:00

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:

$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:

$xmldb = new XMLDB('db.xml');
$xmldb->deleteNode($xmldbtest->selectFromPK('table1', 'clock', 'node'));

To find a node you can use a select