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