Thank you so much Mav3rick.
This does exacly what it says, and this peace of code has solve my problems.
I wanted to do exacly this, and the developers of virtuemart doesn't remember to include this option.
Thanks again.
One question:
This query show all the products from all the sub-categories, in the main category.
And if i only want to show the products from the 1st sub-category? How can i made that? What i have to change in the code?