Here are two useful SQL queries for osCommerce database:
product_attribute_download.qbquery
SELECT p.products_id, p.products_name, a.products_attributes_id, d.products_attributes_filename
FROM products_description p, products_attributes a, products_attributes_download d
where p.products_id=a.products_id
and a.products_attributes_id=d.products_attributes_id;
FROM products_description p, products_attributes a, products_attributes_download d
where p.products_id=a.products_id
and a.products_attributes_id=d.products_attributes_id;
product_category.qbquery
SELECT pc.products_id, pc.categories_id, pd.products_name, cd.categories_name
FROM products_to_categories pc, products_description pd, categories_description cd
WHERE pc.products_id=pd.products_id
AND pc.categories_id= cd.categories_id;
FROM products_to_categories pc, products_description pd, categories_description cd
WHERE pc.products_id=pd.products_id
AND pc.categories_id= cd.categories_id;
