From 43bd7d8c0d94370096f42955f77d02b9852afa20 Mon Sep 17 00:00:00 2001 From: Shikiryu Date: Mon, 21 Oct 2019 09:40:53 +0200 Subject: [PATCH] --- Move.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Move.md diff --git a/Move.md b/Move.md new file mode 100644 index 0000000..40db996 --- /dev/null +++ b/Move.md @@ -0,0 +1,16 @@ +*EXPERIMENTAL* + +*Syntax:* `public function move($node, $to)` + +*Example:* + +```php +xmldb->move($xmldbtest->selectFromPK('table1', 'search', 'node'), 'table2'); +``` + +This will move the item with a PK = "search" from _table1_ to _table2_. + +Tables must be present before the movement or it will return @false@. + +*TODO:* The first goal of this function is to move the element to a precise location and not just append it into another table. +The only way found is to use the DOMDocument function `insertBefore`. We just need to calculate the index of the index... after ;). \ No newline at end of file