Hi all, im looking for some help. I have got this far with my sql query in myphpadmin "SELECT model, COUNT(*) c FROM oc_product GROUP BY model HAVING c>1"
This displays all the model duplicates, what i need it to do is also display all the corrisponding prices, discriptions ect.
Any ideas?
Thanks.
This will give you only one row per model:And this will give you all rows with the same model, but only those models with more than 1 row:
Code: Select all
SELECT p.*, pd.*, COUNT(*) AS c FROM oc_product p, oc_product_description pd WHERE pd.product_id = p.product_id AND pd.language_id = 1 GROUP BY p.model HAVING c>1;
Code: Select all
SELECT p.*, pd.*, (SELECT COUNT(*) FROM oc_product p1 WHERE p1.model = p.model) AS c FROM oc_product p, oc_product_description pd WHERE pd.product_id = p.product_id AND pd.language_id = 1 AND (SELECT COUNT(*) FROM oc_product p1 WHERE p1.model = p.model) > 1;
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Who is online
Users browsing this forum: No registered users and 412 guests