Quote:
select product.product_id , product.sku , product.main_image_url , product.title , product.stock_level , product.price , product.description , manufacturer.name as mname , category.name as cname, category.cat_parent_id as pid, (Select category.name as from category where cat_id = pid) as pname from product , manufacturer , category , category_product where product.manufacturer_id = manufacturer.manuf_id and product.product_id = category_product.product and category_product.category = category.cat_id group by product.product_id
Which gives me the primary category, and the parent category, but not the parent's parent, or the parent's parent's parent. Not all will be the same depth. I feel like I'm bumping up against the limits of my sql knowledge.