query("start transaction"); $set=$db->query("select bookmark_category from node_access where node_id='$chosen_id' and user_id='".$_SESSION['user_id']."'"); $set->next(); $old_category=$set->getString('old_category'); $q="update node_access set bookmark_category='$category_id' where node_id='$chosen_id' and user_id='".$_SESSION['user_id']."'"; $db->query($q); $q="update neurons set central='$category_id' where peripheral='$chosen_id' and central='$old_category'"; $db->update($q); $db->query("commit"); } return true; } ?>