- Ad -
IMPRESSUM dotted_line KONTAKT dotted_line search dotted_line Contact dotted_line sitemap
158 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 14:09 von AmicaNoctis
Aktualisiert: 25-02-2010 um 15: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
...
Moderatorin
Kategorie: Sonstiges
Hits 2518 Kommentare 2 AmicaNoctis ist offline Stichworte bearbeiten

Alle Zeitangaben in WEZ +2. Es ist jetzt 07:54 Uhr.