Post by mashh » Mon May 25, 2015 6:24 pm

Hi,

I uploaded new products using Import/Export tool , first downloaded product list and deleted all records from product tab replacing with new product with new product id ( usually always was everything ok ) but after upload new product i got a errors for almost all products_id . From admin panel i see all old and new products and i can edit them/ delete etc. But front page is crashed, maintenance mode work at this moment.

Code: Select all

PHP Warning:  mysql_query(): Unable to save result set in /home/webadmin/public_html/HOSTNAME/system/database/mysql.php on line 22
2015-05-22 16:06:37 - PHP Notice:  Error: Subquery returns more than 1 row Error No: 1242 SELECT DISTINCT *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT price FROM oc_product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '1' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM oc_product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '1' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special, (SELECT points FROM oc_product_reward pr WHERE pr.product_id = p.product_id AND customer_group_id = '1') AS reward, (SELECT ss.name FROM oc_stock_status ss WHERE ss.stock_status_id = p.stock_status_id AND ss.language_id = '1') AS stock_status, (SELECT wcd.unit FROM oc_weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '1') AS weight_class, (SELECT lcd.unit FROM oc_length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '1') AS length_class, (SELECT AVG(rating) AS total FROM oc_review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT COUNT(*) AS total FROM oc_review r2 WHERE r2.product_id = p.product_id AND r2.status = '1' GROUP BY r2.product_id) AS reviews, p.sort_order FROM oc_product p LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN oc_manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '197' AND pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' in /home/webadmin/public_html/HOSTNAME/system/database/mysql.php on line 50
How to fix this issue , i try find solution on forum but without success.
Opencart v 1.5.6

Newbie

Posts

Joined
Tue Dec 16, 2014 12:23 am

Post by Noman » Wed Oct 21, 2015 4:44 am

Same here. Export/Import broke my categories. Any help from the developer please?

New member

Posts

Joined
Wed Jun 24, 2009 7:44 pm

Post by mashh » Wed Oct 21, 2015 4:34 pm

Hi Noman
In my case i found a duplicate values in Specials-Tab and Rewards-Tab , make sure that you don't have a duplicate values .
Just download your product list via import/export tool , well check and delete duplicate values ,
in my case was eg.
ID | Cust_group | Points
6001 | Default | 0
6001 | VIP | 0
6001 | Default | 0 <- I deleted this value

That should help ! let me know

Newbie

Posts

Joined
Tue Dec 16, 2014 12:23 am
Who is online

Users browsing this forum: Bing [Bot] and 96 guests