var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
I have table like this, which makes dynamic tree.
Id Parent Cost
1 0 10
2 1 20
3 1 30
4 2 40
5 4 60
Now I would like to calculate for example the total cost of the id 2 (20+40+60=120). How to make the sql statement, which aggregate all the cost of selected id and also from the child objects ? How about grouping by the level of parent?
Log in with your username and password
Forgot your password?
Subscribe to dBforums Brief to receive special offers from dBforums partners and sponsors