- Ad -
IMPRESSUM dotted_line KONTAKT dotted_line search dotted_line Contact dotted_line sitemap
191 PHP-Resource Mitglieder online


php-resource



Zurück   PHP-Scripte PHP-Tutorials PHP-Jobs und vieles mehr > Blogs
 

Login

 
eingeloggt bleiben
star Jetzt registrieren   star Passwort vergessen
 

Alt
Bewertung: 2 Stimmen mit einer durchschnittlichen Bewertung von 5,00.

[Nested Set] move subtree

Veröffentlicht: 25-02-2010 um 13:09 von AmicaNoctis
Aktualisiert: 25-02-2010 um 14:22 von AmicaNoctis

Hi there,

there are several multi-statement solutions out there to move a subtree to a new location (possibly inside another parent node), but I couln't find a solution on the Web to achieve this with a single update statement.

Well, here it is:

Code:
-- moves a subtree before the specified position
-- if the position is the rgt of a node, the subtree will be its last child
-- if the position is the lft of a node, the subtree will be inserted
...
Moderator
Kategorie: Sonstiges
Hits 898 Kommentare 2 AmicaNoctis ist gerade online Stichworte bearbeiten

Alle Zeitangaben in WEZ +2. Es ist jetzt 23:42 Uhr.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39