John LeSueur wrote:
instead of if, use case when then end statement:
UPDATE ||table ||
SET lft=lft + case when lft<".$nodes["n1lft"]." then $inc else -$desc end,
rgt=rgt + case when rgt<".$nodes["n1lft"]." then $inc else -$desc end
WHERE root_id=$root_id
AND
lft>=".$nodes["n2lft"]."
AND
rgt<=".$nodes["n1rgt"]."
John
It was simple :-) thank you ( but movement doesn't work ... maybe my own errors )
Cu, andr3a