Skip to content

Instantly share code, notes, and snippets.

@eapdob
Created June 8, 2019 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save eapdob/6b9c2d21156120c7a5ccda83c93175f7 to your computer and use it in GitHub Desktop.
Save eapdob/6b9c2d21156120c7a5ccda83c93175f7 to your computer and use it in GitHub Desktop.
remove all opencart products - sql
DELETE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15
FROM `oc_product` t1
LEFT JOIN `oc_product_attribute` t2 ON(t1.product_id=t2.product_id)
LEFT JOIN `oc_product_description` t3 ON(t1.product_id=t3.product_id)
LEFT JOIN `oc_product_discount` t4 ON(t1.product_id=t4.product_id)
LEFT JOIN `oc_product_image` t5 ON(t1.product_id=t5.product_id)
LEFT JOIN `oc_product_option` t6 ON(t1.product_id=t6.product_id)
LEFT JOIN `oc_product_option_value` t7 ON(t1.product_id=t7.product_id)
LEFT JOIN `oc_product_related` t8 ON(t1.product_id=t8.product_id)
LEFT JOIN `oc_product_reward` t9 ON(t1.product_id=t9.product_id)
LEFT JOIN `oc_product_special` t10 ON(t1.product_id=t10.product_id)
LEFT JOIN `oc_product_to_category` t11 ON(t1.product_id=t11.product_id)
LEFT JOIN `oc_product_to_download` t12 ON(t1.product_id=t12.product_id)
LEFT JOIN `oc_product_to_layout` t13 ON(t1.product_id=t13.product_id)
LEFT JOIN `oc_product_to_store` t14 ON(t1.product_id=t14.product_id)
LEFT JOIN `oc_review` t15 ON(t1.product_id=t15.product_id)
WHERE t1.quantity = '999'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment