VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: kratzi on July 29, 2016, 22:08:51 PM

Title: mysql query for category tree
Post by: kratzi on July 29, 2016, 22:08:51 PM
Hi,

as the title says does anyone of you have a working mysql query which returns the category tree per product?

So basically to get an excel file like this:

Category 1 | Category 1.1 | Category 1.1.1 | Product
Category 1 | Category 1.1 | Category 1.1.2 | Product
Category 1 | Category 1.2 | Category 1.2.1 | Product
Category 1 | Category 1.2 | Category 1.2.2 | Product
Category 2 | Category 2.1 | Category 2.1.1 | Product
Category 2 | Category 2.1 | Category 2.1.2 | Product

Cars      | BMW   | Series 1 | Product
Cars      | BMW   | Series 2 | Product
Cars      | BMW   | Series 3 | Product
Cars      | Mazda | Series 3 | Product
Cars      | Mazda | Series 5 | Product
Cars      | Mazda | Series 7 | Product
Scooter | Vespa  | 100       | Product
Scooter | Vespa  | 200       | Product
Scooter | Vespa  | 300       | Product

Something like the above.

VM 3.0.14 and J 3.5

Thank you