I'm trying to make it working like this:
Right click or left click to a node or subnode.
If that node or subnode ID has set a query to be executed, a menu appears with the query pre-written in the code. Just some variables inside the query.
Instead of showing the same popup menu for each node, each node or subnode ID has a different popup menu to show.
For example if I click the sub-node status, it should only show the popup menu voice 'Change to Unsubscribed' if it is subscribed of course, viceversa 'Change to Subscribed'.
So I should exactly put an identity to each node- subnode to be sure after the righ click that it will show the right menu because I can't run a query to the wrong id!
update students set status=X where id_student=Y
Based to which subnode I click the program will know what will be X and what is Y.
I'm trying wp code but I'm founding it hard to finish.
All is to set an identity to each node, when I know how to identify that the rest will be easier.
WP code presents some issue, in some case when I try to edit name it edit the status. So it's imprecise to recognize the correct cell.